Fix bad name of hook context

This commit is contained in:
Laurent Destailleur 2022-06-20 13:48:06 +02:00
parent 5c82e37517
commit 5ef2f1c69f
3 changed files with 3 additions and 2 deletions

View File

@ -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 *****

View File

@ -2954,6 +2954,7 @@ function dol_print_email($email, $cid = 0, $socid = 0, $addlink = 0, $max = 64,
//$rep .= '</div>';
if ($hookmanager) {
$parameters = array('cid' => $cid, 'socid' => $socid, 'addlink' => $addlink, 'picto' => $withpicto);
$reshook = $hookmanager->executeHooks('printEmail', $parameters, $email);
if ($reshook > 0) {
$rep = '';

View File

@ -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);