Merge pull request #11812 from atm-john/9.0_FIX_MISSING_HOOK
Fix missing hook for agenda export
This commit is contained in:
commit
209a9eb569
@ -95,9 +95,22 @@ if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
||||||
|
$hookmanager->initHooks(array('agendaexport'));
|
||||||
|
|
||||||
|
$reshook = $hookmanager->executeHooks('doActions', $filters); // Note that $action and $object may have been modified by some
|
||||||
|
if ($reshook < 0){
|
||||||
|
llxHeaderVierge();
|
||||||
|
if(!empty($hookmanager->errors) && is_array($hookmanager->errors)){
|
||||||
|
print '<div class="error">'.implode('<br/>', $hookmanager->errors).'</div>';
|
||||||
|
}else{
|
||||||
|
print '<div class="error">'.$hookmanager->error.'</div>';
|
||||||
|
}
|
||||||
|
llxFooterVierge();
|
||||||
|
}
|
||||||
|
elseif(empty($reshook)) {
|
||||||
// Check exportkey
|
// Check exportkey
|
||||||
if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_GET["exportkey"])
|
if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_GET["exportkey"]) {
|
||||||
{
|
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
llxHeaderVierge();
|
llxHeaderVierge();
|
||||||
@ -105,9 +118,8 @@ if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_
|
|||||||
llxFooterVierge();
|
llxFooterVierge();
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
|
||||||
$hookmanager->initHooks(array('agendaexport'));
|
|
||||||
|
|
||||||
// Define filename with prefix on filters predica (each predica set must have on cache file)
|
// Define filename with prefix on filters predica (each predica set must have on cache file)
|
||||||
$shortfilename='dolibarrcalendar';
|
$shortfilename='dolibarrcalendar';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user