diff --git a/htdocs/ticket/stats/index.php b/htdocs/ticket/stats/index.php index 2849fb1a0ce..721f4f30b12 100644 --- a/htdocs/ticket/stats/index.php +++ b/htdocs/ticket/stats/index.php @@ -31,6 +31,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php'; $WIDTH = DolGraph::getDefaultGraphSizeForStats('width'); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height'); +$hookmanager->initHooks(array('ticketstats', 'globalcard')); + if (!$user->hasRight('ticket', 'read')) { accessforbidden(); } @@ -45,6 +47,12 @@ if ($user->socid > 0) { $socid = $user->socid; } +$parameters = array(); +$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) { + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); +} + $nowyear = dol_print_date(dol_now('gmt'), "%Y", 'gmt'); $year = GETPOST('year') > 0 ? GETPOSTINT('year') : $nowyear; $startyear = $year - (!getDolGlobalString('MAIN_STATS_GRAPHS_SHOW_N_YEARS') ? 2 : max(1, min(10, getDolGlobalInt('MAIN_STATS_GRAPHS_SHOW_N_YEARS'))));