Merge pull request #20681 from hregis/fix_missing_hook_parameter
FIX missing hook parameter ($possiblelinks)
This commit is contained in:
commit
2676aeb93f
@ -8404,7 +8404,7 @@ class Form
|
|||||||
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
public function showLinkToObjectBlock($object, $restrictlinksto = array(), $excludelinksto = array())
|
||||||
{
|
{
|
||||||
global $conf, $langs, $hookmanager;
|
global $conf, $langs, $hookmanager;
|
||||||
global $bc, $action;
|
global $action;
|
||||||
|
|
||||||
$linktoelem = '';
|
$linktoelem = '';
|
||||||
$linktoelemlist = '';
|
$linktoelemlist = '';
|
||||||
@ -8450,11 +8450,10 @@ class Form
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can complete the possiblelink array
|
|
||||||
$hookmanager->initHooks(array('commonobject'));
|
|
||||||
$parameters = array('listofidcompanytoscan' => $listofidcompanytoscan);
|
|
||||||
|
|
||||||
if (!empty($listofidcompanytoscan)) { // If empty, we don't have criteria to scan the object we can link to
|
if (!empty($listofidcompanytoscan)) { // If empty, we don't have criteria to scan the object we can link to
|
||||||
|
// Can complete the possiblelink array
|
||||||
|
$hookmanager->initHooks(array('commonobject'));
|
||||||
|
$parameters = array('listofidcompanytoscan' => $listofidcompanytoscan, 'possiblelinks' => $possiblelinks);
|
||||||
$reshook = $hookmanager->executeHooks('showLinkToObjectBlock', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
$reshook = $hookmanager->executeHooks('showLinkToObjectBlock', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user