NEW add hookmanager on note pages

This commit is contained in:
fr69400
2021-07-09 18:36:21 +02:00
parent 1a63a379cc
commit e45d5c1d0d
31 changed files with 232 additions and 41 deletions

View File

@@ -91,6 +91,10 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (!empty($con
if (!empty($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('ordercard', 'globalcard'));
$result = restrictedArea($user, 'commande', $id);
$object = new Commande($db);
@@ -102,9 +106,6 @@ $extrafields->fetch_name_optionals_label($object->table_element);
// Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
$hookmanager->initHooks(array('ordercard', 'globalcard'));
$usercanread = $user->rights->commande->lire;
$usercancreate = $user->rights->commande->creer;
$usercandelete = $user->rights->commande->supprimer;