code cleanup: as bo_merge::is_export_limit_excepted checks for ->is Admin<- already

This commit is contained in:
Klaus Leithoff 2011-08-30 15:13:58 +00:00
parent 10411b539d
commit 1d8034e17b
3 changed files with 8 additions and 8 deletions

View File

@ -40,7 +40,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
// Addressbook defines its own export imits
$limit_exception = bo_merge::is_export_limit_excepted();
if($GLOBALS['egw_info']['server']['contact_export_limit'] == 'no' && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($GLOBALS['egw_info']['server']['contact_export_limit'] == 'no' && !$limit_exception) {
return;
}
@ -65,7 +65,7 @@ class addressbook_export_contacts_csv implements importexport_iface_export_plugi
}
$GLOBALS['egw_info']['flags']['currentapp'] = $old_app;
if($GLOBALS['egw_info']['server']['contact_export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($GLOBALS['egw_info']['server']['contact_export_limit'] && !$limit_exception) {
$selection = array_slice($selection, 0, $GLOBALS['egw_info']['server']['contact_export_limit']);
}
if($options['explode_multiselects']) {

View File

@ -44,7 +44,7 @@ class calendar_export_csv implements importexport_iface_export_plugin {
'users' => $options['selection']['owner'],
'cfs' => $cfs // Otherwise we shouldn't get any custom fields
);
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['offset'] = 0;
$query['num_rows'] = (int)$config['export_limit'];
}
@ -57,7 +57,7 @@ class calendar_export_csv implements importexport_iface_export_plugin {
$query['start'] = 0;
$query['cfs'] = $cfs;
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['num_rows'] = (int)$config['export_limit'];
}
$ui = new calendar_uilist();
@ -66,7 +66,7 @@ class calendar_export_csv implements importexport_iface_export_plugin {
$query = $GLOBALS['egw']->session->appsession('session_data','calendar');
$query['users'] = explode(',', $query['owner']);
$query['num_rows'] = -1;
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['num_rows'] = (int)$config['export_limit'];
}

View File

@ -44,7 +44,7 @@ class calendar_export_ical extends calendar_export_csv {
'users' => $options['selection']['owner'],
'cfs' => $cfs // Otherwise we shouldn't get any custom fields
);
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['offset'] = 0;
$query['num_rows'] = (int)$config['export_limit'];
}
@ -57,7 +57,7 @@ class calendar_export_ical extends calendar_export_csv {
$query['start'] = 0;
$query['cfs'] = $cfs;
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['num_rows'] = (int)$config['export_limit'];
}
$ui = new calendar_uilist();
@ -66,7 +66,7 @@ class calendar_export_ical extends calendar_export_csv {
$query = $GLOBALS['egw']->session->appsession('session_data','calendar');
$query['users'] = explode(',', $query['owner']);
$query['num_rows'] = -1;
if($config['export_limit'] && !($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
if($config['export_limit'] && !$limit_exception) {
$query['num_rows'] = (int)$config['export_limit'];
}