From a48f48283c027a6cbf1183dffa23df7eff58d696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 15 Nov 2022 18:23:57 +0100 Subject: [PATCH] Update list.php --- htdocs/societe/list.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/societe/list.php b/htdocs/societe/list.php index 1c8b51fc0f1..f5fcc56b49d 100644 --- a/htdocs/societe/list.php +++ b/htdocs/societe/list.php @@ -1449,10 +1449,9 @@ while ($i < min($num, $limit)) { $obj = $db->fetch_object($resql); $parameters = array('staticdata' => $obj); // Note that $action and $object may have been modified by hook + // do companystatic fetch in hook if wanted or anything else $reshook = $hookmanager->executeHooks('loadStaticObject', $parameters, $companystatic, $action); - if ($reshook < 0) { - $companystatic->fetch($obj->rowid); - } else { + if (empty($reshook)) { $companystatic->id = $obj->rowid; $companystatic->name = $obj->name; $companystatic->name_alias = $obj->name_alias;