Silence warning when export exception is not set

This commit is contained in:
Nathan Gray 2011-08-22 14:20:44 +00:00
parent b76da493de
commit 0264b70a0b
5 changed files with 7 additions and 7 deletions

View File

@ -568,7 +568,7 @@ class addressbook_ui extends addressbook_bo
}
// check if user is an admin or the export is not generally turned off (contact_export_limit is non-numerical, eg. no)
$exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
if ((isset($GLOBALS['egw_info']['user']['apps']['admin']) || $exception) || !$this->config['contact_export_limit'] || (int)$this->config['contact_export_limit'])
{
$actions['export'] = array(

View File

@ -556,7 +556,7 @@ abstract class bo_merge
return $contentstart.implode('<text:line-break />',$contentrepeatpages).$contentend;
case 'application/vnd.openxmlformats-officedocument.wordprocessingml.document':
case 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet':
return $contentstart.implode('<w:br w:type="page" />',$contentrep).$contentend;
return $contentstart.implode('<w:br w:type="page" />',$contentrepeatpages).$contentend;
case 'text/plain':
return $contentstart.implode("\r\n",$contentrep).$contentend;
}
@ -1156,7 +1156,7 @@ abstract class bo_merge
}
}
}
$limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$limit_exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
return array(
'icon' => 'etemplate/merge',
'caption' => $caption,

View File

@ -276,7 +276,7 @@ class nextmatch_widget
unset($value['rows']);
$extension_data += $value;
$limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$limit_exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$value['no_csv_export'] = $value['csv_fields'] === false ||
$GLOBALS['egw_info']['server']['export_limit'] && !is_numeric($GLOBALS['egw_info']['server']['export_limit']) &&
!(isset($GLOBALS['egw_info']['user']['apps']['admin']) || $limit_exception);

View File

@ -38,7 +38,7 @@ class importexport_admin_prefs_sidebox_hooks
),
);
$config = config::read('phpgwapi');
$limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$limit_exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
if($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception || $config['export_limit'] !== 'no')
{
$file[] = array(
@ -123,7 +123,7 @@ class importexport_admin_prefs_sidebox_hooks
}
}
$config = config::read('phpgwapi');
$limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$limit_exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
if (($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception || !$config['export_limit'] || $config['export_limit'] > 0) && $cache[$appname]['export'])
{
$file['Export CSV'] = array('link' => "javascript:egw_openWindowCentered2('".

View File

@ -49,7 +49,7 @@ class importexport_export_ui {
$preserv = array();
// Check global setting
$limit_exception = count(array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
$limit_exception = count(@array_intersect(array($GLOBALS['egw_info']['user']['account_id']) + $GLOBALS['egw']->accounts->memberships($GLOBALS['egw_info']['user']['account_id'],true), unserialize($GLOBALS['egw_info']['server']['export_limit_excepted']))) > 0;
if(!($GLOBALS['egw_info']['user']['apps']['admin'] || $limit_exception)) {
$config = config::read('phpgwapi');
if($config['export_limit'] == 'no') {