mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-22 23:00:56 +01:00
fix bug regarding merge_print with export_limit set in calendar, as calendar may pass a search query instead of a list of ids (this is the reason, why the test within bo_merge on export_limit is not working as expected)
This commit is contained in:
parent
117179ad0f
commit
74b41ec99a
@ -135,7 +135,12 @@ class calendar_merge extends bo_merge
|
|||||||
$events = array($id);
|
$events = array($id);
|
||||||
$this->ids = $events;
|
$this->ids = $events;
|
||||||
}
|
}
|
||||||
|
// as this function allows to pass query- parameters, we need to check the result of the query against export_limit restrictions
|
||||||
|
if (bo_merge::hasExportLimit($this->export_limit) && !bo_merge::is_export_limit_excepted() && count($events) > (int)$this->export_limit)
|
||||||
|
{
|
||||||
|
$err = lang('No rights to export more then %1 entries!',(int)$this->export_limit);
|
||||||
|
throw new egw_exception_wrong_userinput($err);
|
||||||
|
}
|
||||||
$replacements = array();
|
$replacements = array();
|
||||||
$n = 0;
|
$n = 0;
|
||||||
foreach($events as $event)
|
foreach($events as $event)
|
||||||
|
@ -601,12 +601,22 @@ abstract class bo_merge
|
|||||||
if ($contentrepeat) $content = $contentrepeat; //content to repeat
|
if ($contentrepeat) $content = $contentrepeat; //content to repeat
|
||||||
if ($lableprint) $content = $Labelrepeat;
|
if ($lableprint) $content = $Labelrepeat;
|
||||||
|
|
||||||
// generate replacements
|
// generate replacements; if exeption is thrown, catch it set error message and return false
|
||||||
if(!($replacements = $this->get_replacements($id,$content)))
|
try
|
||||||
{
|
{
|
||||||
$err = lang('Entry not found!');
|
if(!($replacements = $this->get_replacements($id,$content)))
|
||||||
|
{
|
||||||
|
$err = lang('Entry not found!');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (egw_exception_wrong_userinput $e)
|
||||||
|
{
|
||||||
|
// if this returns with an exeption, something failed big time
|
||||||
|
$err = $e->getMessage();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// some general replacements: current user, date and time
|
// some general replacements: current user, date and time
|
||||||
if (strpos($content,'$$user/') !== null && ($user = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')))
|
if (strpos($content,'$$user/') !== null && ($user = $GLOBALS['egw']->accounts->id2name($GLOBALS['egw_info']['user']['account_id'],'person_id')))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user