Merge pull request #11529 from atm-ph/fix_9.0_missing_hook

Fix missing hook
This commit is contained in:
Laurent Destailleur 2019-07-22 18:41:55 +02:00 committed by GitHub
commit 56851f475e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -63,11 +63,18 @@ $object = new BonPrelevement($db,"");
// Load object // Load object
include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
$hookmanager->initHooks(array('directdebitprevcard','globalcard'));
/* /*
* Actions * Actions
*/ */
$parameters = array('socid' => $socid);
$reshook = $hookmanager->executeHooks('doActions', $parameters, $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))
{
if ( $action == 'confirm_delete' ) if ( $action == 'confirm_delete' )
{ {
$res=$object->delete($user); $res=$object->delete($user);
@ -136,6 +143,7 @@ if ($action == 'infocredit' && $user->rights->prelevement->bons->credit)
exit; exit;
} }
} }
}