Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into 6.0
This commit is contained in:
commit
9d4d85ca9d
@ -66,6 +66,14 @@ $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);
|
||||||
|
|
||||||
|
$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 ($action == 'confirm_add_resource')
|
||||||
{
|
{
|
||||||
if (! $cancel)
|
if (! $cancel)
|
||||||
@ -122,7 +130,7 @@ if ($action == 'confirm_add_resource')
|
|||||||
Header("Location: list.php");
|
Header("Location: list.php");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* View
|
* View
|
||||||
|
|||||||
@ -58,6 +58,9 @@ if( ! $user->rights->resource->read)
|
|||||||
accessforbidden();
|
accessforbidden();
|
||||||
|
|
||||||
$object = new Dolresource($db);
|
$object = new Dolresource($db);
|
||||||
|
$objectFetchRes = $object->fetch($id);
|
||||||
|
if (! ($objectFetchRes > 0)) dol_print_error($db, $object->error);
|
||||||
|
|
||||||
|
|
||||||
$extrafields = new ExtraFields($db);
|
$extrafields = new ExtraFields($db);
|
||||||
|
|
||||||
@ -162,7 +165,7 @@ llxHeader('',$pagetitle,'');
|
|||||||
$form = new Form($db);
|
$form = new Form($db);
|
||||||
$formresource = new FormResource($db);
|
$formresource = new FormResource($db);
|
||||||
|
|
||||||
if ( $object->fetch($id) > 0 )
|
if ( $objectFetchRes > 0 )
|
||||||
{
|
{
|
||||||
$head=resource_prepare_head($object);
|
$head=resource_prepare_head($object);
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user