diff --git a/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php b/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php index 01746be79e..ffa7b78766 100644 --- a/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php +++ b/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php @@ -33,7 +33,7 @@ class importexport_admin_prefs_sidebox_hooks ), ); $config = config::read('phpgwapi'); - if($GLOBALS['egw_info']['user']['apps']['admin'] || $config['export_limit'] !== 'no') + if($config['export_limit'] !== 'no') { $file[] = array( 'text' => 'Export', diff --git a/importexport/inc/class.importexport_definitions_ui.inc.php b/importexport/inc/class.importexport_definitions_ui.inc.php index c14d376df3..650cf8e89f 100644 --- a/importexport/inc/class.importexport_definitions_ui.inc.php +++ b/importexport/inc/class.importexport_definitions_ui.inc.php @@ -83,16 +83,13 @@ class importexport_definitions_ui if(!$GLOBALS['egw_info']['user']['apps']['admin']) { // Filter private definitions $filter['owner'] = $GLOBALS['egw_info']['user']['account_id']; - - $config = config::read('phpgwapi'); - if($config['export_limit'] == 'no') { - $filter['type'] = 'import'; - } } else { $filter[] = '!owner || owner IS NULL'; } - - + $config = config::read('phpgwapi'); + if($config['export_limit'] == 'no') { + $filter['type'] = 'import'; + } $bodefinitions = new importexport_definitions_bo($filter, true); if (is_array($content)) diff --git a/importexport/inc/class.importexport_export_ui.inc.php b/importexport/inc/class.importexport_export_ui.inc.php index 43bf4c2324..00a21f41e3 100644 --- a/importexport/inc/class.importexport_export_ui.inc.php +++ b/importexport/inc/class.importexport_export_ui.inc.php @@ -49,12 +49,11 @@ class importexport_export_ui { $preserv = array(); // Check global setting - if(!$GLOBALS['egw_info']['user']['apps']['admin']) { - $config = config::read('phpgwapi'); - if($config['export_limit'] == 'no') { - die(lang('Admin disabled exporting')); - } + $config = config::read('phpgwapi'); + if($config['export_limit'] == 'no') { + die(lang('Admin disabled exporting')); } + $et = new etemplate(self::_appname. '.export_dialog'); $_appname = $_content['appname'] ? $_content['appname'] : $_GET['appname']; $_definition = $_content['definition'] ? $_content['definition'] : $_GET['definition'];