From dedd0ef20d9b657da45273c0b6f2ea431e0efa89 Mon Sep 17 00:00:00 2001 From: atm-adrien Date: Tue, 30 Jan 2024 15:15:32 +0100 Subject: [PATCH] FIX : Adding hooks init --- htdocs/commande/contact.php | 3 +++ htdocs/commande/document.php | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index a5fc715eb38..dd0fa8d35f6 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -45,6 +45,9 @@ $action = GETPOST('action', 'aZ09'); if ($user->socid) { $socid = $user->socid; } +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ordercontact')); + $result = restrictedArea($user, 'commande', $id, ''); $usercancreate = $user->hasRight("commande", "creer"); diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index f16ad2ad3d3..3d5449c6c83 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -80,6 +80,10 @@ $permissiontoadd = $usercancreate; if ($user->socid) { $socid = $user->socid; } + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('ordercarddocument')); + $result = restrictedArea($user, 'commande', $id, '');