Merge pull request #23056 from frederic34/bankhooks

add hooks init
This commit is contained in:
Laurent Destailleur 2022-12-01 10:49:48 +01:00 committed by GitHub
commit 6d8e09aee1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 0 deletions

View File

@ -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('bankannualreport', 'globalcard'));
// Security check
$fieldvalue = (!empty($id) ? $id : (!empty($ref) ? $ref : ''));
$fieldtype = (!empty($ref) ? 'ref' : 'rowid');

View File

@ -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 = '';

View File

@ -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');

View File

@ -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');