From 5ef2f1c69fc1942746eebeb8f4db534920017e02 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 20 Jun 2022 13:48:06 +0200 Subject: [PATCH] Fix bad name of hook context --- ChangeLog | 2 +- htdocs/core/lib/functions.lib.php | 1 + htdocs/fourn/card.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fb83d84bc60..0b0e8695a7b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -198,7 +198,7 @@ Following changes may create regressions for some external modules, but were nec * Method fetch_all_resources(), fetch_all_used(), fetch_all_available() of DolResource has been removed (they were not used by core code). * Method fetch_all of DolResource has been renamed into fetchAll() to match naming conventions. * The hook 'upgrade' and 'doUpgrade2" has been renamed 'doUpgradeBefore' and 'doUpgradeAfterDB'. A new trigger 'doUpgradeAfterFiles' has been introduced. - +* The context hook 'suppliercard' when on the supplier tab of a thirdparty has been renamed into 'thirdpartysupplier' ***** ChangeLog for 15.0.2 compared to 15.0.1 ***** diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 89995ab539b..bf41b5a624a 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -2954,6 +2954,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64, //$rep .= ''; if ($hookmanager) { $parameters = array('cid' => $cid, 'socid' => $socid, 'addlink' => $addlink, 'picto' => $withpicto); + $reshook = $hookmanager->executeHooks('printEmail', $parameters, $email); if ($reshook > 0) { $rep = ''; diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index de75bccf099..fb89cd2c455 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -70,7 +70,7 @@ $extrafields = new ExtraFields($db); $extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('suppliercard', 'globalcard')); +$hookmanager->initHooks(array('thirdpartysupplier', 'globalcard')); // Security check $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid', 0);