mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 12:39:25 +01:00
check if app is set before calling the hook on export_limit; TODO: move the call to bo_merge::getExportLimit and cache the appspecific returnvalue there, to improve speed
This commit is contained in:
parent
f616b34f58
commit
d216a37bba
@ -275,9 +275,9 @@ class nextmatch_widget
|
|||||||
// save values in persistent extension_data to be able use it in post_process
|
// save values in persistent extension_data to be able use it in post_process
|
||||||
unset($value['rows']);
|
unset($value['rows']);
|
||||||
$extension_data += $value;
|
$extension_data += $value;
|
||||||
$tname = is_object($value['template']) ? $value['template']->name : $value['template'];
|
list($app) = explode('.',$tmpl->name);
|
||||||
list($app) = explode('.',$tname);
|
$export_limit = $GLOBALS['egw_info']['server']['export_limit'];
|
||||||
$export_limit = $GLOBALS['egw']->hooks->single('export_limit',$app);
|
if (empty($app)) $export_limit = $GLOBALS['egw']->hooks->single('export_limit',$app);
|
||||||
$value['no_csv_export'] = $value['csv_fields'] === false ||
|
$value['no_csv_export'] = $value['csv_fields'] === false ||
|
||||||
!bo_merge::hasExportLimit($export_limit,'ISALLOWED') &&
|
!bo_merge::hasExportLimit($export_limit,'ISALLOWED') &&
|
||||||
!bo_merge::is_export_limit_excepted();
|
!bo_merge::is_export_limit_excepted();
|
||||||
@ -1454,7 +1454,8 @@ class nextmatch_widget
|
|||||||
{
|
{
|
||||||
$name = is_object($value['template']) ? $value['template']->name : $value['template'];
|
$name = is_object($value['template']) ? $value['template']->name : $value['template'];
|
||||||
list($app) = explode('.',$name);
|
list($app) = explode('.',$name);
|
||||||
$export_limit = $GLOBALS['egw']->hooks->single('export_limit',$app);
|
$export_limit = $GLOBALS['egw_info']['server']['export_limit'];
|
||||||
|
if (!empty($app)) $export_limit = $GLOBALS['egw']->hooks->single('export_limit',$app);
|
||||||
//if (isset($value['export_limit'])) $export_limit = $value['export_limit'];
|
//if (isset($value['export_limit'])) $export_limit = $value['export_limit'];
|
||||||
}
|
}
|
||||||
$charset = $charset_out = translation::charset();
|
$charset = $charset_out = translation::charset();
|
||||||
|
Loading…
Reference in New Issue
Block a user