Fix: hook problem
This commit is contained in:
parent
fc3fefee6c
commit
4ea47d221f
@ -1471,7 +1471,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
// Other attributes
|
// Other attributes
|
||||||
$parameters=array('colspan' => ' colspan="3"');
|
$parameters=array('colspan' => ' colspan="3"');
|
||||||
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('formObjectOptions',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook))
|
if (empty($reshook) && ! empty($extrafields->attribute_label))
|
||||||
{
|
{
|
||||||
foreach($extrafields->attribute_label as $key=>$label)
|
foreach($extrafields->attribute_label as $key=>$label)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -148,7 +148,7 @@ class HookManager
|
|||||||
$var=!$var;
|
$var=!$var;
|
||||||
|
|
||||||
// Hooks that return int
|
// Hooks that return int
|
||||||
if (($method == 'doActions' || $method='formObjectOptions') && method_exists($actioninstance,$method))
|
if (($method == 'doActions' || $method == 'formObjectOptions') && method_exists($actioninstance,$method))
|
||||||
{
|
{
|
||||||
$resaction+=$actioninstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
$resaction+=$actioninstance->$method($parameters, $object, $action, $this); // $object and $action can be changed by method ($object->id during creation for example or $action to go back to other action for example)
|
||||||
if ($resaction < 0 || ! empty($actioninstance->error) || (! empty($actioninstance->errors) && count($actioninstance->errors) > 0))
|
if ($resaction < 0 || ! empty($actioninstance->error) || (! empty($actioninstance->errors) && count($actioninstance->errors) > 0))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user