2
0
forked from Wavyzz/dolibarr

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

@@ -45,6 +45,10 @@ $socid = 0;
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('ordernote'));
$result = restrictedArea($user, 'commande', $id, '');
@@ -61,7 +65,12 @@ $permissionnote = $user->rights->commande->creer; // Used by the include of acti
* Actions
*/
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once
$reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks
if ($reshook < 0)
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
/*