From e618eb3e64252dc0106802c89bfb7845b9b54e39 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Courtier?= Date: Fri, 17 Mar 2023 10:58:41 +0100 Subject: [PATCH] FIX: Add missing hook on LibStatut --- htdocs/ticket/class/ticket.class.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e03bdabe617..e77c7cc2562 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1273,7 +1273,7 @@ class Ticket extends CommonObject public function LibStatut($status, $mode = 0, $notooltip = 0) { // phpcs:enable - global $langs; + global $langs, $hookmanager; $labelStatus = $this->statuts[$status]; $labelStatusShort = $this->statuts_short[$status]; @@ -1301,6 +1301,18 @@ class Ticket extends CommonObject $mode = 0; } + $parameters = array( + 'status' => $status, + 'mode' => $mode, + ); + + // Note that $action and $object may have been modified by hook + $reshook = $hookmanager->executeHooks('LibStatut', $parameters, $this); + + if ($reshook > 0) { + return $hookmanager->resPrint; + } + $params = array(); if ($notooltip) { $params = array('tooltip' => 'no');