diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index b351cd2b67d..e26654a07ee 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -77,10 +77,10 @@ $result = restrictedArea($user, 'adherent', $object->id, '', '', 'socid', 'rowid * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index eaf888fde05..207465d1187 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -71,10 +71,10 @@ $permissionnote = 1; */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once /* diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 6cd0d8e0692..3d70c09b35a 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -71,10 +71,10 @@ restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index d9ff0603e9f..e42382dfbd6 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -66,10 +66,10 @@ restrictedArea($user, 'propal', $object->id, 'propal'); $permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 8fa66913922..41598249e8c 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -66,10 +66,10 @@ $permissionnote = $user->rights->commande->creer; // Used by the include of acti */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 0e6ab39f5ca..863fde5812b 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -54,7 +54,7 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } -$hookmanager->initHooks(array('invoicenote')); +$hookmanager->initHooks(array('invoicenote')); $result = restrictedArea($user, 'facture', $id, ''); @@ -64,10 +64,10 @@ $result = restrictedArea($user, 'facture', $id, ''); */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index 167ee7ef4a3..bbcb660ebdf 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -57,10 +57,10 @@ $hookmanager->initHooks(array('contactnote')); * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index a41a33af6c7..4314b7ab976 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -61,10 +61,10 @@ $permissionnote = $user->rights->contrat->creer; // Used by the include of actio */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/don/note.php b/htdocs/don/note.php index fdf70350680..03f2d687012 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -47,7 +47,7 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } -$hookmanager->initHooks(array('donnote')); +$hookmanager->initHooks(array('donnote')); $result = restrictedArea($user, 'don', $id, ''); @@ -61,10 +61,10 @@ $permissionnote = $user->rights->don->creer; // Used by the include of actions_s * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once if ($action == 'classin' && $user->rights->don->creer) { diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 02312ded462..99c01900184 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -116,10 +116,10 @@ $permissiontoadd = $user->rights->eventorganization->conferenceorboothattendee-> */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once /* diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 4aebfdc7da5..804a4fbc829 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -79,10 +79,10 @@ $result = restrictedArea($user, 'expedition', $object->id, ''); */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index 24ea0dd4643..26e6c23a7ec 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -44,7 +44,7 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } -$hookmanager->initHooks(array('expensereportnote')); +$hookmanager->initHooks(array('expensereportnote')); $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); @@ -75,10 +75,10 @@ if ($object->id > 0) { */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index b671aacf252..62fb5fe32ac 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -42,7 +42,7 @@ $action = GETPOST('action', 'aZ09'); if ($user->socid) { $socid = $user->socid; } -$hookmanager->initHooks(array('fichinternote')); +$hookmanager->initHooks(array('fichinternote')); $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); @@ -55,10 +55,10 @@ $permissionnote = $user->rights->ficheinter->creer; // Used by the include of ac */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 22c93256cbb..89272e3b80a 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -58,10 +58,10 @@ $permissionnote = ($user->rights->fournisseur->commande->creer || $user->rights- */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index cede169b8c6..e4dbea9a98a 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -60,10 +60,10 @@ $permissionnote = ($user->rights->fournisseur->facture->creer || $user->rights-> */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once // Set label diff --git a/htdocs/knowledgemanagement/knowledgerecord_note.php b/htdocs/knowledgemanagement/knowledgerecord_note.php index 93be4e841ec..562fe79f216 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_note.php +++ b/htdocs/knowledgemanagement/knowledgerecord_note.php @@ -67,10 +67,10 @@ $permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; / */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 3bf520a3ae0..6df215d354a 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -42,7 +42,7 @@ $langs->loadLangs(array("loan")); // Security check $id = GETPOST('id', 'int'); -$hookmanager->initHooks(array('loannote')); +$hookmanager->initHooks(array('loannote')); $result = restrictedArea($user, 'loan', $id, '&loan'); $object = new Loan($db); @@ -59,10 +59,10 @@ $permissionnote = $user->rights->loan->write; // Used by the include of actions_ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index 48f78c4d37e..aec084ce3c6 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -118,10 +118,10 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the incl */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index e7c08d4378f..5c65da9c161 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -70,10 +70,10 @@ $permissionnote = $user->rights->mrp->write; // Used by the include of actions_s $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index 90f2e54933d..0fee9a10ce4 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -66,10 +66,10 @@ $permissiontoadd = $user->rights->partnership->write; // Used by the include of * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/product/note.php b/htdocs/product/note.php index 12e1d80774a..fb014d3dcca 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -70,10 +70,10 @@ $hookmanager->initHooks(array('productnote')); * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index e93e361eb64..3d13aa47afe 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -57,10 +57,10 @@ $permissionnote = $user->rights->projet->creer; // Used by the include of action */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 8c3e43b578f..2c1f4732925 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -93,10 +93,10 @@ $permissionnote = ($user->rights->projet->creer || $user->rights->projet->all->c */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 90c448294d7..d9962a9ef18 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -93,10 +93,10 @@ if ($origin == 'reception') { */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index 3b92802d5b1..c0d71fcd777 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -95,10 +95,10 @@ $result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruit */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index 8911fd55361..519419cb297 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -100,10 +100,10 @@ $result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruit */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 1f58cc348f4..01e020a8617 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -56,10 +56,10 @@ $permissionnote = $user->rights->resource->write; // Used by the include of acti */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index ee2eeed65a5..3f07987290f 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -57,10 +57,10 @@ $result = restrictedArea($user, 'societe', $object->id, '&societe'); * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index e463fbcb26c..dcd529a951f 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -61,10 +61,10 @@ $object = new SupplierProposal($db); $permissionnote = $user->rights->supplier_proposal->creer; // Used by the include of actions_setnotes.inc.php $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index f1198e971ab..2f96263f54f 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -69,10 +69,10 @@ restrictedArea($user, $object->element, $object->id, $object->table_element, 'wo * Actions */ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); // Note that $action and $object may have been modified by some hooks -if ($reshook < 0) +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -if (empty($reshook)) +if (empty($reshook)) include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once