Fix: add array return
This commit is contained in:
parent
61e90e0d9d
commit
5b3a3b8e2e
@ -37,6 +37,9 @@ class HookManager
|
||||
|
||||
// Array with instantiated classes
|
||||
var $hooks=array();
|
||||
|
||||
// Array result
|
||||
var $resArray=array();
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@ -168,7 +171,9 @@ class HookManager
|
||||
else if (method_exists($actioninstance,$method))
|
||||
{
|
||||
if (is_array($parameters) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actioninstance->module_number) continue;
|
||||
$resprint.=$actioninstance->$method($parameters, $object, $action, $this);
|
||||
$result = $actioninstance->$method($parameters, $object, $action, $this);
|
||||
if (is_array($result)) $this->resArray = array_merge($this->resArray, $result);
|
||||
else $resprint.=$result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1651,9 +1651,9 @@ function pdf_getLinkedObjects($object,$outputlangs,$hookmanager=false)
|
||||
{
|
||||
$parameters = array('linkedobjects' => $linkedobjects, 'outputlangs'=>$outputlangs);
|
||||
$action='';
|
||||
$linkedobjects = $hookmanager->executeHooks('pdf_getLinkedObjects',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
$hookmanager->executeHooks('pdf_getLinkedObjects',$parameters,$object,$action); // Note that $action and $object may have been modified by some hooks
|
||||
}
|
||||
|
||||
|
||||
return $linkedobjects;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user