Fix missing hook then can't interact with actions
This commit is contained in:
parent
a3b746bcb9
commit
c961a397c4
@ -61,13 +61,22 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('levycard','globalcard'));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == "new")
|
$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 == "new")
|
||||||
|
{
|
||||||
if ($object->id > 0)
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$db->begin();
|
$db->begin();
|
||||||
@ -86,10 +95,10 @@ if ($action == "new")
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$action='';
|
$action='';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == "delete")
|
if ($action == "delete")
|
||||||
{
|
{
|
||||||
if ($object->id > 0)
|
if ($object->id > 0)
|
||||||
{
|
{
|
||||||
$result = $object->demande_prelevement_delete($user, GETPOST('did'));
|
$result = $object->demande_prelevement_delete($user, GETPOST('did'));
|
||||||
@ -99,6 +108,7 @@ if ($action == "delete")
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user