Fix Add doaction hook

This commit is contained in:
John 2017-08-07 15:49:17 +02:00
parent d791476708
commit 76bee57553

View File

@ -66,8 +66,16 @@ $extrafields = new ExtraFields($db);
// fetch optionals attributes and labels // fetch optionals attributes and labels
$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);
if ($action == 'confirm_add_resource') $hookmanager->initHooks(array('resource_card_add','globalcard'));
$parameters=array();
$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_add_resource')
{
if (! $cancel) if (! $cancel)
{ {
$error=''; $error='';
@ -121,9 +129,9 @@ if ($action == 'confirm_add_resource')
{ {
Header("Location: list.php"); Header("Location: list.php");
} }
}
} }
/* /*
* View * View
*/ */