forked from extern/egroupware
code cleanup: as bo_merge::is_export_limit_excepted checks for ->is Admin<- already
This commit is contained in:
parent
1d8034e17b
commit
25fcf25bdb
@ -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(
|
||||
|
@ -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'];
|
||||
|
@ -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'));
|
||||
|
Loading…
Reference in New Issue
Block a user