Fix: move "moreHtmlRef" hook in "showrefnav" function

This commit is contained in:
Regis Houssin 2018-03-27 17:36:25 +02:00
parent 180f2a0336
commit 35b6cb750f
2 changed files with 5 additions and 5 deletions

View File

@ -6444,6 +6444,11 @@ class Form
else $morehtmlstatus=$hookmanager->resPrint;
if ($morehtmlstatus) $ret.='<div class="statusref">'.$morehtmlstatus.'</div>';
$parameters = array();
$reshook = $hookmanager->executeHooks('moreHtmlRef', $parameters, $object); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $morehtmlref.=$hookmanager->resPrint;
elseif ($reshook > 0) $morehtmlref=$hookmanager->resPrint;
// Left part of banner
if ($morehtmlleft)
{

View File

@ -1554,11 +1554,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
$morehtmlref.='</div>';
}
$parameters = array();
$reshook = $hookmanager->executeHooks('moreHtmlRef', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
if (empty($reshook)) $morehtmlref.=$hookmanager->resPrint;
elseif ($reshook > 0) $morehtmlref=$hookmanager->resPrint;
print '<div class="'.($onlybanner?'arearefnobottom ':'arearef ').'heightref valignmiddle" width="100%">';
print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright);
print '</div>';