From ce83fa9f7e32621bd59eccd4dc8f1a34cc5fd299 Mon Sep 17 00:00:00 2001 From: atm-florian Date: Thu, 31 Mar 2022 17:34:24 +0200 Subject: [PATCH 1/2] FIX missing call to executeHooks() --- htdocs/core/boxes/box_dolibarr_state_board.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index 21bf58b859f..028547f7867 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -79,6 +79,9 @@ class box_dolibarr_state_board extends ModeleBoxes if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $hookmanager = new HookManager($this->db); $hookmanager->initHooks(array('index')); + $object = new stdClass; + $action = ''; + $hookmanager->executeHooks('addStatisticLine', array(), $object, $action); $boxstatItems = array(); $boxstatFromHook = ''; $boxstatFromHook = $hookmanager->resPrint; From 5df5050418461383fbabb72fad6dac0eb5df1c04 Mon Sep 17 00:00:00 2001 From: Florian Mortgat <50440633+atm-florianm@users.noreply.github.com> Date: Fri, 1 Apr 2022 09:14:04 +0200 Subject: [PATCH 2/2] Apply suggestions from code review replace spaces with tabs --- htdocs/core/boxes/box_dolibarr_state_board.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index 028547f7867..9661b1d363e 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -79,9 +79,9 @@ class box_dolibarr_state_board extends ModeleBoxes if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $hookmanager = new HookManager($this->db); $hookmanager->initHooks(array('index')); - $object = new stdClass; - $action = ''; - $hookmanager->executeHooks('addStatisticLine', array(), $object, $action); + $object = new stdClass; + $action = ''; + $hookmanager->executeHooks('addStatisticLine', array(), $object, $action); $boxstatItems = array(); $boxstatFromHook = ''; $boxstatFromHook = $hookmanager->resPrint;