From e45d5c1d0dc3fd955016e5b96840a84ede68a6a5 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Fri, 9 Jul 2021 18:36:21 +0200 Subject: [PATCH 01/55] NEW add hookmanager on note pages --- htdocs/adherents/note.php | 9 +++++++-- htdocs/asset/note.php | 6 +++++- htdocs/bom/bom_note.php | 7 ++++++- htdocs/comm/propal/note.php | 11 ++++++++++- htdocs/commande/card.php | 7 ++++--- htdocs/commande/note.php | 11 ++++++++++- htdocs/compta/facture/note.php | 9 ++++++++- htdocs/contact/note.php | 10 ++++++++-- htdocs/contrat/note.php | 15 ++++++++++----- htdocs/don/note.php | 9 ++++++++- .../conferenceorboothattendee_note.php | 6 +++++- htdocs/expedition/note.php | 9 ++++++++- htdocs/expensereport/note.php | 10 ++++++++-- htdocs/fichinter/note.php | 8 +++++++- htdocs/fourn/commande/note.php | 11 ++++++++--- htdocs/fourn/facture/note.php | 10 +++++++++- .../knowledgemanagement/knowledgerecord_note.php | 7 ++++++- htdocs/loan/note.php | 10 +++++++++- htdocs/modulebuilder/template/myobject_note.php | 7 ++++++- htdocs/mrp/mo_note.php | 8 +++++++- htdocs/partnership/partnership_note.php | 6 +++++- htdocs/product/note.php | 9 ++++++++- htdocs/projet/note.php | 8 +++++++- htdocs/projet/tasks/note.php | 10 +++++++++- htdocs/reception/note.php | 12 +++++++++++- .../recruitment/recruitmentcandidature_note.php | 7 ++++++- .../recruitment/recruitmentjobposition_note.php | 7 ++++++- htdocs/resource/note.php | 10 +++++++++- htdocs/societe/note.php | 6 ++++++ htdocs/supplier_proposal/note.php | 12 +++++++++++- htdocs/workstation/workstation_note.php | 6 +++++- 31 files changed, 232 insertions(+), 41 deletions(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index cc216d794d1..b351cd2b67d 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -68,15 +68,20 @@ if ($id) { $caneditfieldmember = $user->rights->adherent->creer; } +$hookmanager->initHooks(array('membernote')); + // Security check $result = restrictedArea($user, 'adherent', $object->id, '', '', 'socid', 'rowid', 0); - /* * Actions */ +$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'); -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +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 752591ade9e..eaf888fde05 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -70,8 +70,12 @@ $permissionnote = 1; * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* * View diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 539eb654751..6cd0d8e0692 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -70,7 +70,12 @@ restrictedArea($user, 'bom', $object->id, 'bom_bom', '', '', 'rowid', $isdraft); * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 6dd62a9990d..d9ff0603e9f 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -52,6 +52,10 @@ if ($user->socid > 0) { $socid = $user->socid; $object->id = $user->socid; } + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('propalnote')); + restrictedArea($user, 'propal', $object->id, 'propal'); @@ -61,7 +65,12 @@ restrictedArea($user, 'propal', $object->id, 'propal'); $permissionnote = $user->rights->propale->creer; // Used by the include of actions_setnotes.inc.php -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 diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 6d0badf6380..db3d4ee621e 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -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; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 6872990a3ec..8fa66913922 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -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 /* diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index f019d822529..0e6ab39f5ca 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -54,6 +54,8 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } +$hookmanager->initHooks(array('invoicenote')); + $result = restrictedArea($user, 'facture', $id, ''); @@ -61,7 +63,12 @@ $result = restrictedArea($user, 'facture', $id, ''); * 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 diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index c301ef02276..167ee7ef4a3 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -49,13 +49,19 @@ if ($id > 0) { $permissionnote = $user->rights->societe->creer; // Used by the include of actions_setnotes.inc.php // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('contactcard')); +// $hookmanager->initHooks(array('contactcard')); -> Name conflict with product/card.php +$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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once +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 eab56b97a16..a41a33af6c7 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -44,6 +44,10 @@ $ref = GETPOST('ref', 'alpha'); 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('contractcard', 'globalcard')); -> Conflict with contrat\card.php +$hookmanager->initHooks(array('contractnote')); + $result = restrictedArea($user, 'contrat', $id); $object = new Contrat($db); @@ -51,16 +55,17 @@ $object->fetch($id, $ref); $permissionnote = $user->rights->contrat->creer; // Used by the include of actions_setnotes.inc.php -// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context -$hookmanager->initHooks(array('contractcard', 'globalcard')); - - /* * 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 diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 2e153d73b95..fdf70350680 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -47,6 +47,8 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } +$hookmanager->initHooks(array('donnote')); + $result = restrictedArea($user, 'don', $id, ''); $object = new Don($db); @@ -58,7 +60,12 @@ $permissionnote = $user->rights->don->creer; // Used by the include of actions_s /* * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 if ($action == 'classin' && $user->rights->don->creer) { $object->fetch($id); diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 46620112311..02312ded462 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -115,8 +115,12 @@ $permissiontoadd = $user->rights->eventorganization->conferenceorboothattendee-> * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* * View diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index a9076162015..4aebfdc7da5 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -69,6 +69,8 @@ $permissionnote = $user->rights->expedition->creer; // Used by the include of ac if ($user->socid) { $socid = $user->socid; } + +$hookmanager->initHooks(array('expeditionnote')); $result = restrictedArea($user, 'expedition', $object->id, ''); @@ -76,7 +78,12 @@ $result = restrictedArea($user, 'expedition', $object->id, ''); * 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 /* diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index b0156c6a475..24ea0dd4643 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -44,6 +44,8 @@ $socid = 0; if ($user->socid) { $socid = $user->socid; } +$hookmanager->initHooks(array('expensereportnote')); + $result = restrictedArea($user, 'expensereport', $id, 'expensereport'); @@ -68,12 +70,16 @@ if ($object->id > 0) { } } - /* * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index fcc790bf8c2..b671aacf252 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -42,6 +42,7 @@ $action = GETPOST('action', 'aZ09'); if ($user->socid) { $socid = $user->socid; } +$hookmanager->initHooks(array('fichinternote')); $result = restrictedArea($user, 'ficheinter', $id, 'fichinter'); $object = new Fichinter($db); @@ -53,7 +54,12 @@ $permissionnote = $user->rights->ficheinter->creer; // Used by the include of ac * 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 /* diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index d9b0904c7ef..22c93256cbb 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -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 /* diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 5bbf1fdcba6..cede169b8c6 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -44,6 +44,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('invoicesuppliernote')); + $result = restrictedArea($user, 'fournisseur', $id, 'facture_fourn', 'facture'); $object = new FactureFournisseur($db); @@ -56,7 +59,12 @@ $permissionnote = ($user->rights->fournisseur->facture->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 // Set label if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { diff --git a/htdocs/knowledgemanagement/knowledgerecord_note.php b/htdocs/knowledgemanagement/knowledgerecord_note.php index a6a9974a9c8..93be4e841ec 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_note.php +++ b/htdocs/knowledgemanagement/knowledgerecord_note.php @@ -66,7 +66,12 @@ $permissiontoadd = $user->rights->knowledgemanagement->knowledgerecord->write; / * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index f7930b64c9a..3bf520a3ae0 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -41,6 +41,8 @@ $langs->loadLangs(array("loan")); // Security check $id = GETPOST('id', 'int'); + +$hookmanager->initHooks(array('loannote')); $result = restrictedArea($user, 'loan', $id, '&loan'); $object = new Loan($db); @@ -55,7 +57,13 @@ $permissionnote = $user->rights->loan->write; // Used by the include of actions_ * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index f5fc29a2591..48f78c4d37e 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -117,7 +117,12 @@ $permissiontoadd = $user->rights->mymodule->myobject->write; // Used by the incl * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 6bbfc503453..e7c08d4378f 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -68,7 +68,13 @@ $permissionnote = $user->rights->mrp->write; // Used by the include of actions_s * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index b9607e5aeb6..90f2e54933d 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -65,8 +65,12 @@ $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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +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 b758f414035..12e1d80774a 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -63,11 +63,18 @@ if ($object->id > 0) { } +$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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once +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 8b65156570a..e93e361eb64 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -46,6 +46,7 @@ if (!empty($conf->global->PROJECT_ALLOW_COMMENT_ON_PROJECT) && method_exists($ob // Security check $socid = 0; //if ($user->socid > 0) $socid = $user->socid; // For external user, no check is done on company because readability is managed by public status of project and assignement. +$hookmanager->initHooks(array('projetnote')); $result = restrictedArea($user, 'projet', $id, 'projet&project'); $permissionnote = $user->rights->projet->creer; // Used by the include of actions_setnotes.inc.php @@ -55,7 +56,12 @@ $permissionnote = $user->rights->projet->creer; // Used by the include of action * 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 /* diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 4d581afc30a..8c3e43b578f 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -44,6 +44,9 @@ $socid = 0; if (!$user->rights->projet->lire) { accessforbidden(); } + +$hookmanager->initHooks(array('projettasknote')); + //$result = restrictedArea($user, 'projet', $id, '', 'task'); // TODO ameliorer la verification $object = new Task($db); @@ -89,7 +92,12 @@ $permissionnote = ($user->rights->projet->creer || $user->rights->projet->all->c * Actions */ -include DOL_DOCUMENT_ROOT.'/core/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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +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 f343e56e14d..90c448294d7 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -67,6 +67,11 @@ $permissionnote = $user->rights->reception->creer; // Used by the include of act if ($user->socid > 0) { $socid = $user->socid; } + + +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('receptionnote')); + if ($origin == 'reception') { $result = restrictedArea($user, $origin, $object->id); } else { @@ -87,7 +92,12 @@ if ($origin == 'reception') { * 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 /* diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index d4c18155c5d..3b92802d5b1 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -94,7 +94,12 @@ $result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruit * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index 9dbcd0e1180..8911fd55361 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -99,7 +99,12 @@ $result = restrictedArea($user, 'recruitment', $object->id, 'recruitment_recruit * Actions */ -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_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 /* diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 07819b1d0b4..1f58cc348f4 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -40,6 +40,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('resourcenote')); + $result = restrictedArea($user, 'resource', $id, 'resource'); $object = new DolResource($db); @@ -52,7 +55,12 @@ $permissionnote = $user->rights->resource->write; // 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 /* diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index d4396738966..ee2eeed65a5 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -56,6 +56,12 @@ $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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); + +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 d16bc90033e..e463fbcb26c 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -43,6 +43,11 @@ $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('supplier_proposalnote')); + $result = restrictedArea($user, 'supplier_proposal', $id, 'supplier_proposal'); $object = new SupplierProposal($db); @@ -55,7 +60,12 @@ $object = new SupplierProposal($db); $permissionnote = $user->rights->supplier_proposal->creer; // Used by the include of actions_setnotes.inc.php -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 /* diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index 18fa87b5ea6..f1198e971ab 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -68,8 +68,12 @@ 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) + setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); -include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +if (empty($reshook)) + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once /* From 4272f93aa4b12c8bc0e0d68d16bcd731a6bc46df Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 9 Jul 2021 16:41:41 +0000 Subject: [PATCH 02/55] Fixing style errors. --- htdocs/adherents/note.php | 4 ++-- htdocs/asset/note.php | 4 ++-- htdocs/bom/bom_note.php | 4 ++-- htdocs/comm/propal/note.php | 4 ++-- htdocs/commande/note.php | 4 ++-- htdocs/compta/facture/note.php | 6 +++--- htdocs/contact/note.php | 4 ++-- htdocs/contrat/note.php | 4 ++-- htdocs/don/note.php | 6 +++--- htdocs/eventorganization/conferenceorboothattendee_note.php | 4 ++-- htdocs/expedition/note.php | 4 ++-- htdocs/expensereport/note.php | 6 +++--- htdocs/fichinter/note.php | 6 +++--- htdocs/fourn/commande/note.php | 4 ++-- htdocs/fourn/facture/note.php | 4 ++-- htdocs/knowledgemanagement/knowledgerecord_note.php | 4 ++-- htdocs/loan/note.php | 6 +++--- htdocs/modulebuilder/template/myobject_note.php | 4 ++-- htdocs/mrp/mo_note.php | 4 ++-- htdocs/partnership/partnership_note.php | 4 ++-- htdocs/product/note.php | 4 ++-- htdocs/projet/note.php | 4 ++-- htdocs/projet/tasks/note.php | 4 ++-- htdocs/reception/note.php | 4 ++-- htdocs/recruitment/recruitmentcandidature_note.php | 4 ++-- htdocs/recruitment/recruitmentjobposition_note.php | 4 ++-- htdocs/resource/note.php | 4 ++-- htdocs/societe/note.php | 4 ++-- htdocs/supplier_proposal/note.php | 4 ++-- htdocs/workstation/workstation_note.php | 4 ++-- 30 files changed, 65 insertions(+), 65 deletions(-) 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 From 5ec903723dd03e1c7a92bcd91ad9931d125fffd1 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:42:35 +0200 Subject: [PATCH 03/55] Update note.php --- htdocs/adherents/note.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index e26654a07ee..70642612483 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -77,12 +77,12 @@ $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 - +} /* From c7e6f66823c5dfd2ad62d7e1ea7bdd862b2a94ac Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:43:02 +0000 Subject: [PATCH 04/55] Fixing style errors. --- htdocs/adherents/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 70642612483..0444d03b2ff 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -80,7 +80,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From b8fd4394a17f5e1b6f265df8005564e730fa0291 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:43:08 +0200 Subject: [PATCH 05/55] Update note.php --- htdocs/asset/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 207465d1187..8a356ec516b 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -71,11 +71,12 @@ $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 +} /* * View From 698f6db72e62c7c9d5d927b300a0ad2684e57d9e Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:43:34 +0000 Subject: [PATCH 06/55] Fixing style errors. --- htdocs/asset/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index 8a356ec516b..16af18d8277 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -74,7 +74,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From dafd0fb4b08ccd480f7b66f52edd127e19227417 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:44:01 +0200 Subject: [PATCH 07/55] Update bom_note.php --- htdocs/bom/bom_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 3d70c09b35a..7e808ee60f5 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -71,11 +71,12 @@ 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 +} /* From bf03a30a9ff6157202fd2f07fadc9363d5008d64 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:44:18 +0200 Subject: [PATCH 08/55] Update note.php --- htdocs/comm/propal/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index e42382dfbd6..e16b4367390 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -66,11 +66,12 @@ 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 +} From cc4defd212bf5e93464b7d1403280eb85569e89b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:44:41 +0000 Subject: [PATCH 09/55] Fixing style errors. --- htdocs/bom/bom_note.php | 2 +- htdocs/comm/propal/note.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 7e808ee60f5..f456e7ddf98 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -74,7 +74,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 e16b4367390..53a3a37c84d 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -69,7 +69,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From a27b0cd797a90ffe8dddda1c30afefc93c1edfe4 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:45:22 +0200 Subject: [PATCH 10/55] Update note.php --- htdocs/commande/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 41598249e8c..e5c98da9765 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -66,11 +66,12 @@ $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 +} /* From c7ad0a59c90614349c783b3d08bb067e0238a21e Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:45:38 +0200 Subject: [PATCH 11/55] Update note.php --- htdocs/compta/facture/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/compta/facture/note.php b/htdocs/compta/facture/note.php index 863fde5812b..adc6182dd61 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -64,11 +64,12 @@ $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 +} From d485d9d2fd1771f5fb8a2bd31576ae2467cdbddd Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:45:59 +0200 Subject: [PATCH 12/55] Update note.php --- htdocs/contact/note.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/contact/note.php b/htdocs/contact/note.php index bbcb660ebdf..a3dbc28554d 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -57,11 +57,12 @@ $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)) - include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once +} +if (empty($reshook)){ + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +} /* From 556c2c7e5a82333f671495badbf7f6c8b27fd92f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:46:15 +0200 Subject: [PATCH 13/55] Update note.php --- htdocs/contrat/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/contrat/note.php b/htdocs/contrat/note.php index 4314b7ab976..8b08123a3f4 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -61,11 +61,12 @@ $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 +} From a8752bf097800258d625e23b884a95b7524a5558 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:46:34 +0000 Subject: [PATCH 14/55] Fixing style errors. --- htdocs/commande/note.php | 2 +- htdocs/compta/facture/note.php | 2 +- htdocs/contact/note.php | 2 +- htdocs/contrat/note.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index e5c98da9765..dbfb0bdd43c 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -69,7 +69,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 adc6182dd61..efb0e23a27a 100644 --- a/htdocs/compta/facture/note.php +++ b/htdocs/compta/facture/note.php @@ -67,7 +67,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 a3dbc28554d..1cb76b5336e 100644 --- a/htdocs/contact/note.php +++ b/htdocs/contact/note.php @@ -60,7 +60,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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/contrat/note.php b/htdocs/contrat/note.php index 8b08123a3f4..46a710a754d 100644 --- a/htdocs/contrat/note.php +++ b/htdocs/contrat/note.php @@ -64,7 +64,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 2eb10c40b2ea7709b145ee0384ff0cce0d118302 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:46:52 +0200 Subject: [PATCH 15/55] Update conferenceorboothattendee_note.php --- .../eventorganization/conferenceorboothattendee_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 99c01900184..4f0bb74a4e5 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -116,11 +116,12 @@ $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 +} /* * View From fdaf29fd658a842926b1556071894ae85eb41d9f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:47:08 +0000 Subject: [PATCH 16/55] Fixing style errors. --- htdocs/eventorganization/conferenceorboothattendee_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/eventorganization/conferenceorboothattendee_note.php b/htdocs/eventorganization/conferenceorboothattendee_note.php index 4f0bb74a4e5..fd72b1588e7 100644 --- a/htdocs/eventorganization/conferenceorboothattendee_note.php +++ b/htdocs/eventorganization/conferenceorboothattendee_note.php @@ -119,7 +119,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From cd554459058922848bec023612238fc43685552b Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:47:17 +0200 Subject: [PATCH 17/55] Update note.php --- htdocs/expedition/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 804a4fbc829..314633a53d0 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -79,11 +79,12 @@ $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 +} /* From 84493fb55d5f520bec845ea2bb59560b4a956d1b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:47:32 +0000 Subject: [PATCH 18/55] Fixing style errors. --- htdocs/expedition/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 314633a53d0..d9282481603 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -82,7 +82,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From ce9cf63c361662e30996811d227ee8e45571c483 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:47:36 +0200 Subject: [PATCH 19/55] Update note.php --- htdocs/expensereport/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index 26e6c23a7ec..c0100008bfe 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -75,11 +75,12 @@ 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 +} /* From d22ed4be821a86a11712b10d89bc678553b9dde1 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:47:50 +0000 Subject: [PATCH 20/55] Fixing style errors. --- htdocs/expensereport/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index c0100008bfe..5649f2144e4 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -78,7 +78,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From b91f5ad500c31c89983a34b0e115e4b9ddab719f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:47:58 +0200 Subject: [PATCH 21/55] Update note.php --- htdocs/fichinter/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 62fb5fe32ac..9cacd6205c7 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -55,11 +55,12 @@ $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 +} /* From beaee09c984afbd8d5c9e963f12b7e01ed09dc1e Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:48:15 +0200 Subject: [PATCH 22/55] Update note.php --- htdocs/fourn/commande/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 89272e3b80a..66716581e03 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -58,11 +58,12 @@ $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 +} /* From 48846888ccd052ee6d9518d0a8d4470b47f4eb41 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:48:30 +0000 Subject: [PATCH 23/55] Fixing style errors. --- htdocs/fichinter/note.php | 2 +- htdocs/fourn/commande/note.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 9cacd6205c7..01a8d82cf5a 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -58,7 +58,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 66716581e03..b3e7d33e5d9 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -61,7 +61,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From ce4cab04d45f683ae65af264782e3c59984cdf3b Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:48:33 +0200 Subject: [PATCH 24/55] Update note.php --- htdocs/fourn/facture/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index e4dbea9a98a..0f6751384e0 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -60,11 +60,12 @@ $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 if ($action == 'setlabel' && ($user->rights->fournisseur->facture->creer || $user->rights->supplier_invoice->creer)) { From 7f18bdf85bdaf79e46ee305fe649950cd7dccf45 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:48:50 +0200 Subject: [PATCH 25/55] Update knowledgerecord_note.php --- htdocs/knowledgemanagement/knowledgerecord_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/knowledgemanagement/knowledgerecord_note.php b/htdocs/knowledgemanagement/knowledgerecord_note.php index 562fe79f216..250230b8609 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_note.php +++ b/htdocs/knowledgemanagement/knowledgerecord_note.php @@ -67,11 +67,12 @@ $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 +} /* From 789cea9a85a038a751eab3d0e54d4a6ed005332f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:49:05 +0000 Subject: [PATCH 26/55] Fixing style errors. --- htdocs/fourn/facture/note.php | 2 +- htdocs/knowledgemanagement/knowledgerecord_note.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 0f6751384e0..c5ea5feac68 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -63,7 +63,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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/knowledgemanagement/knowledgerecord_note.php b/htdocs/knowledgemanagement/knowledgerecord_note.php index 250230b8609..87d9eed9bdb 100644 --- a/htdocs/knowledgemanagement/knowledgerecord_note.php +++ b/htdocs/knowledgemanagement/knowledgerecord_note.php @@ -70,7 +70,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 29e0ce787f7f6801ee8b1e0d2d35e88fc8dc3b03 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:49:24 +0200 Subject: [PATCH 27/55] Update note.php --- htdocs/loan/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 6df215d354a..7cfc8b0df1d 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -59,11 +59,12 @@ $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 +} /* From efbf9db1053312ce851e99e485c967fc0418d7e4 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:49:39 +0000 Subject: [PATCH 28/55] Fixing style errors. --- htdocs/loan/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index 7cfc8b0df1d..a17445db6cf 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -62,7 +62,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 35c0008fa073488f1526c5fb152d755f6d335d03 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:49:42 +0200 Subject: [PATCH 29/55] Update myobject_note.php --- htdocs/modulebuilder/template/myobject_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index aec084ce3c6..23298fcf80c 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -118,11 +118,12 @@ $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 +} /* From 21e213507f8ce5e177b6bd47ae2cb30ddf410f2a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:49:56 +0000 Subject: [PATCH 30/55] Fixing style errors. --- htdocs/modulebuilder/template/myobject_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/modulebuilder/template/myobject_note.php b/htdocs/modulebuilder/template/myobject_note.php index 23298fcf80c..7f324fbd456 100644 --- a/htdocs/modulebuilder/template/myobject_note.php +++ b/htdocs/modulebuilder/template/myobject_note.php @@ -121,7 +121,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From aeba1dd2b24606d987cc250d70910c47b1eacdbd Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:50:06 +0200 Subject: [PATCH 31/55] Update partnership_note.php --- htdocs/partnership/partnership_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index 0fee9a10ce4..aed79934306 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -66,11 +66,12 @@ $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 +} /* From 6810391a6a14024e028c192ea37e108b336000bf Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:50:20 +0000 Subject: [PATCH 32/55] Fixing style errors. --- htdocs/partnership/partnership_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/partnership/partnership_note.php b/htdocs/partnership/partnership_note.php index aed79934306..cc97eac5515 100644 --- a/htdocs/partnership/partnership_note.php +++ b/htdocs/partnership/partnership_note.php @@ -69,7 +69,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 1b2f0fc15507efa6f817a88ba4be990dd044ed7f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:50:24 +0200 Subject: [PATCH 33/55] Update note.php --- htdocs/product/note.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/htdocs/product/note.php b/htdocs/product/note.php index fb014d3dcca..0333c360042 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -70,11 +70,12 @@ $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)) - include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not includ_once +} +if (empty($reshook)){ + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +} /* From c6fb975d51dda2465d390f2a7a1dafd467352ebb Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:50:38 +0000 Subject: [PATCH 34/55] Fixing style errors. --- htdocs/product/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/note.php b/htdocs/product/note.php index 0333c360042..c54bd3637ae 100644 --- a/htdocs/product/note.php +++ b/htdocs/product/note.php @@ -73,7 +73,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 2e4b45488f7e7c43190fc7f32f1a3d3b2d0ca81a Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:50:42 +0200 Subject: [PATCH 35/55] Update note.php --- htdocs/projet/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index 3d13aa47afe..d7a2af62718 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -57,11 +57,12 @@ $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 +} /* From 2a1eb97b7db97cc5ae81d44793bc8fdd55b2a9c5 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:50:57 +0000 Subject: [PATCH 36/55] Fixing style errors. --- htdocs/projet/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/note.php b/htdocs/projet/note.php index d7a2af62718..9fee6615c40 100644 --- a/htdocs/projet/note.php +++ b/htdocs/projet/note.php @@ -60,7 +60,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 9a6cafb3c5fb65929ae64f8d646776e81325a713 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:52:01 +0200 Subject: [PATCH 37/55] Update note.php --- htdocs/don/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 03f2d687012..01a017d7b5d 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -61,11 +61,12 @@ $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) { $object->fetch($id); From 21e5d067e267ca6d5eb5d440267fd87489adcfe9 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:52:16 +0000 Subject: [PATCH 38/55] Fixing style errors. --- htdocs/don/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 01a017d7b5d..13f9b1d4a96 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -64,7 +64,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From eb6284e15297b97a52fdcba056206fd94e4f47bf Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:52:46 +0200 Subject: [PATCH 39/55] Update mo_note.php --- htdocs/mrp/mo_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index 5c65da9c161..b584e04cec5 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -70,11 +70,12 @@ $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 +} /* From 2d6efd2d4c9a6c346a04ba35380a4f0e8842986e Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:53:01 +0000 Subject: [PATCH 40/55] Fixing style errors. --- htdocs/mrp/mo_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/mrp/mo_note.php b/htdocs/mrp/mo_note.php index b584e04cec5..fd1e2d8cbfa 100644 --- a/htdocs/mrp/mo_note.php +++ b/htdocs/mrp/mo_note.php @@ -73,7 +73,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 209fe70da0a2bb78e9a4c15224fde479ac08b84f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:53:13 +0200 Subject: [PATCH 41/55] Update note.php --- htdocs/projet/tasks/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 2c1f4732925..618cc75115b 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -93,11 +93,12 @@ $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 +} /* From b227a85d31a656778c4edb902dff7d32c594c2f8 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:53:28 +0000 Subject: [PATCH 42/55] Fixing style errors. --- htdocs/projet/tasks/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/projet/tasks/note.php b/htdocs/projet/tasks/note.php index 618cc75115b..f1fc0c31524 100644 --- a/htdocs/projet/tasks/note.php +++ b/htdocs/projet/tasks/note.php @@ -96,7 +96,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From f3ebbbbbc009e9aff1d07deb2e8ce9c425cfb015 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:53:38 +0200 Subject: [PATCH 43/55] Update note.php --- htdocs/reception/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index d9962a9ef18..10124a8361b 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -93,11 +93,12 @@ 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 +} /* From e617f9ca389c8e582daa439d8721e252ef5de1ea Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:53:53 +0000 Subject: [PATCH 44/55] Fixing style errors. --- htdocs/reception/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/reception/note.php b/htdocs/reception/note.php index 10124a8361b..2c1eb55d7b3 100644 --- a/htdocs/reception/note.php +++ b/htdocs/reception/note.php @@ -96,7 +96,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From d35719b939c59eb948eea1ef63120194af464166 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:53:57 +0200 Subject: [PATCH 45/55] Update recruitmentcandidature_note.php --- htdocs/recruitment/recruitmentcandidature_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index c0d71fcd777..478c7f479cf 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -95,11 +95,12 @@ $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 +} /* From 8bf504d7f39b74a58fd7b291cbf84f58e793e846 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:54:10 +0000 Subject: [PATCH 46/55] Fixing style errors. --- htdocs/recruitment/recruitmentcandidature_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php index 478c7f479cf..19808ca1b59 100644 --- a/htdocs/recruitment/recruitmentcandidature_note.php +++ b/htdocs/recruitment/recruitmentcandidature_note.php @@ -98,7 +98,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 7e4cf44ed382a6b70a7b9e9e89c8d79fe3fd254f Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:54:13 +0200 Subject: [PATCH 47/55] Update note.php --- htdocs/resource/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 01e020a8617..99b298e5db2 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -56,11 +56,12 @@ $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 +} /* From b5606e31810c07353e6e2f8d9905d54f995ddb8f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:54:28 +0000 Subject: [PATCH 48/55] Fixing style errors. --- htdocs/resource/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/resource/note.php b/htdocs/resource/note.php index 99b298e5db2..b43c9f8cb37 100644 --- a/htdocs/resource/note.php +++ b/htdocs/resource/note.php @@ -59,7 +59,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From d5c8243a121677e1cd0a32f7ef464a9882b9e752 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:54:35 +0200 Subject: [PATCH 49/55] Update note.php --- htdocs/societe/note.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 3f07987290f..1b5dcb93349 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -57,13 +57,12 @@ $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)) - 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 +} +if (empty($reshook)){ + include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once +} /* From 8d75d37cad5776b08b99ea2d619189dc4281ad8c Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:54:50 +0000 Subject: [PATCH 50/55] Fixing style errors. --- htdocs/societe/note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/societe/note.php b/htdocs/societe/note.php index 1b5dcb93349..c896d4df70a 100644 --- a/htdocs/societe/note.php +++ b/htdocs/societe/note.php @@ -60,7 +60,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 931d939d74758941660fab3676120ff675fca122 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:55:18 +0200 Subject: [PATCH 51/55] Update note.php --- htdocs/supplier_proposal/note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index dcd529a951f..ce13a4f078a 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -61,11 +61,12 @@ $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 +} /* From e43da11ac8d244f2b9e0119efd368cc4ae0f3d0b Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:55:33 +0200 Subject: [PATCH 52/55] Update workstation_note.php --- htdocs/workstation/workstation_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/workstation/workstation_note.php b/htdocs/workstation/workstation_note.php index 2f96263f54f..cd5a75ce896 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -69,11 +69,12 @@ 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 +} /* From 9ec1e7d50e9cf5e4f1a19fbeaba27c407b78c50a Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:55:48 +0000 Subject: [PATCH 53/55] Fixing style errors. --- htdocs/supplier_proposal/note.php | 2 +- htdocs/workstation/workstation_note.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/supplier_proposal/note.php b/htdocs/supplier_proposal/note.php index ce13a4f078a..c4ab85e8e20 100644 --- a/htdocs/supplier_proposal/note.php +++ b/htdocs/supplier_proposal/note.php @@ -64,7 +64,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 cd5a75ce896..7e1b765bf82 100755 --- a/htdocs/workstation/workstation_note.php +++ b/htdocs/workstation/workstation_note.php @@ -72,7 +72,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 } From 4d12c6eff66adc7e49e47205bf73949408192061 Mon Sep 17 00:00:00 2001 From: fr69400 <82267780+fr69400@users.noreply.github.com> Date: Sun, 11 Jul 2021 09:57:04 +0200 Subject: [PATCH 54/55] Update recruitmentjobposition_note.php --- htdocs/recruitment/recruitmentjobposition_note.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index 519419cb297..4da4e6a160c 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -100,11 +100,12 @@ $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 +} /* From 986e86e6aeaeb390adbde492821a26223cca7b3b Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Sun, 11 Jul 2021 07:57:19 +0000 Subject: [PATCH 55/55] Fixing style errors. --- htdocs/recruitment/recruitmentjobposition_note.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/recruitment/recruitmentjobposition_note.php b/htdocs/recruitment/recruitmentjobposition_note.php index 4da4e6a160c..dc7cdaef4ae 100644 --- a/htdocs/recruitment/recruitmentjobposition_note.php +++ b/htdocs/recruitment/recruitmentjobposition_note.php @@ -103,7 +103,7 @@ $reshook = $hookmanager->executeHooks('doActions', array(), $object, $action); / 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 }