Fix missing hook

This commit is contained in:
atm-ph 2019-07-19 11:26:21 +02:00
parent 9b8b3b1ffc
commit a03bb00254

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;
} }
} }
}