From fc146b2dc61724cc5980eb46c8b503c9f2cba547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Wed, 30 Nov 2022 17:59:42 +0100 Subject: [PATCH] add hooks init --- htdocs/compta/bank/annuel.php | 3 +++ htdocs/compta/bank/document.php | 3 +++ htdocs/compta/bank/graph.php | 3 +++ htdocs/compta/bank/releve.php | 3 +++ 4 files changed, 12 insertions(+) diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 610cf17498c..7365d1ed552 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -39,6 +39,9 @@ $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 160); $id = GETPOST('account') ?GETPOST('account', 'alpha') : GETPOST('id'); $ref = GETPOST('ref'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankstats', 'globalcard')); + // Security check $fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : '')); $fieldtype = (!empty($ref) ? 'ref' : 'rowid'); diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 595d627609b..0960b984c04 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -38,6 +38,9 @@ $ref = GETPOST('ref', 'alpha'); $action = GETPOST('action', 'aZ09'); $confirm = GETPOST('confirm', 'alpha'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankaccountdocuments', 'globalcard')); + // Security check if ($user->socid) { $action = ''; diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index a3fd0b0b15b..c11e13f1e71 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -35,6 +35,9 @@ $langs->loadLangs(array('banks', 'categories')); $WIDTH = DolGraph::getDefaultGraphSizeForStats('width', 768); $HEIGHT = DolGraph::getDefaultGraphSizeForStats('height', 200); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankstats', 'globalcard')); + // Security check if (GETPOST('account') || GETPOST('ref')) { $id = GETPOST('account') ? GETPOST('account') : GETPOST('ref'); diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 8f5e7f29069..2e532984d99 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -62,6 +62,9 @@ $newbankreceipt = GETPOST('newbankreceipt', 'alpha'); $rel = GETPOST("rel", 'alphanohtml'); $backtopage = GETPOST('backtopage', 'alpha'); +// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context +$hookmanager->initHooks(array('bankaccountstatement', 'globalcard')); + // Security check $fieldid = (!empty($ref) ? $ref : $id); $fieldname = (!empty($ref) ? 'ref' : 'rowid');