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 4286fb9b5b..0caa859780 100644 --- a/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php +++ b/importexport/inc/class.importexport_admin_prefs_sidebox_hooks.inc.php @@ -38,7 +38,7 @@ class importexport_admin_prefs_sidebox_hooks ), ); $config = config::read('phpgwapi'); - if($GLOBALS['egw_info']['user']['apps']['admin'] || bo_merge::is_export_limit_excepted() || $config['export_limit'] !== 'no') + if(bo_merge::is_export_limit_excepted() || $config['export_limit'] !== 'no') { $file[] = array( 'text' => 'Export', @@ -122,7 +122,7 @@ class importexport_admin_prefs_sidebox_hooks } } $config = config::read('phpgwapi'); - if (($GLOBALS['egw_info']['user']['apps']['admin'] || bo_merge::is_export_limit_excepted() || !$config['export_limit'] || $config['export_limit'] > 0) && $cache[$appname]['export']) + if ((bo_merge::is_export_limit_excepted() || !$config['export_limit'] || $config['export_limit'] > 0) && $cache[$appname]['export']) { $file['Export CSV'] = array('link' => "javascript:egw_openWindowCentered2('". egw::link('/index.php',array( diff --git a/importexport/inc/class.importexport_export_csv.inc.php b/importexport/inc/class.importexport_export_csv.inc.php index 63a0469556..0a58a5e121 100644 --- a/importexport/inc/class.importexport_export_csv.inc.php +++ b/importexport/inc/class.importexport_export_csv.inc.php @@ -101,7 +101,7 @@ class importexport_export_csv implements importexport_iface_export_record $this->csv_options = array_merge( $this->csv_options, $_options ); } - if(!($GLOBALS['egw_info']['user']['apps']['admin'] || bo_merge::is_export_limit_excepted())) { + if(!bo_merge::is_export_limit_excepted()) { $config = config::read('phpgwapi'); if($config['export_limit'] == 'no') throw new egw_exception_no_permission_admin('Export disabled'); $this->export_limit = (int)$config['export_limit']; diff --git a/importexport/inc/class.importexport_export_ui.inc.php b/importexport/inc/class.importexport_export_ui.inc.php index 6d49391a7f..117f67dbb5 100644 --- a/importexport/inc/class.importexport_export_ui.inc.php +++ b/importexport/inc/class.importexport_export_ui.inc.php @@ -49,7 +49,7 @@ class importexport_export_ui { $preserv = array(); // Check global setting - if(!($GLOBALS['egw_info']['user']['apps']['admin'] || bo_merge::is_export_limit_excepted())) { + if(!bo_merge::is_export_limit_excepted()) { $config = config::read('phpgwapi'); if($config['export_limit'] == 'no') { die(lang('Admin disabled exporting'));