mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 01:12:33 +01:00
NEW add hookmanager on note pages
This commit is contained in:
@@ -43,13 +43,13 @@ $action = GETPOST('action', 'aZ09');
|
||||
if ($user->socid) {
|
||||
$socid = $user->socid;
|
||||
}
|
||||
|
||||
$hookmanager->initHooks(array('ordersuppliercardnote'));
|
||||
$result = restrictedArea($user, 'fournisseur', $id, 'commande_fournisseur', 'commande');
|
||||
|
||||
$object = new CommandeFournisseur($db);
|
||||
$object->fetch($id, $ref);
|
||||
|
||||
$hookmanager->initHooks(array('ordersuppliercardnote'));
|
||||
|
||||
$permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights->supplier_order->creer); // Used by the include of actions_setnotes.inc.php
|
||||
|
||||
|
||||
@@ -57,7 +57,12 @@ $permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights-
|
||||
* 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
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user