Fix: add array return
This commit is contained in:
parent
61e90e0d9d
commit
5b3a3b8e2e
@ -38,6 +38,9 @@ class HookManager
|
|||||||
// Array with instantiated classes
|
// Array with instantiated classes
|
||||||
var $hooks=array();
|
var $hooks=array();
|
||||||
|
|
||||||
|
// Array result
|
||||||
|
var $resArray=array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -168,7 +171,9 @@ class HookManager
|
|||||||
else if (method_exists($actioninstance,$method))
|
else if (method_exists($actioninstance,$method))
|
||||||
{
|
{
|
||||||
if (is_array($parameters) && $parameters['special_code'] > 3 && $parameters['special_code'] != $actioninstance->module_number) continue;
|
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,7 +1651,7 @@ function pdf_getLinkedObjects($object,$outputlangs,$hookmanager=false)
|
|||||||
{
|
{
|
||||||
$parameters = array('linkedobjects' => $linkedobjects, 'outputlangs'=>$outputlangs);
|
$parameters = array('linkedobjects' => $linkedobjects, 'outputlangs'=>$outputlangs);
|
||||||
$action='';
|
$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;
|
return $linkedobjects;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user