Add doActions on ticket stats (#30336)
This commit is contained in:
parent
572061ff80
commit
1a3c4d5289
1 changed files with 8 additions and 0 deletions
|
|
@ -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'))));
|
||||
|
|
|
|||
Loading…
Reference in a new issue