Skip to content

Commit

Permalink
Fix: move "moreHtmlRef" hook in "showrefnav" function
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis committed Mar 27, 2018
1 parent 180f2a0 commit 35b6cb7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions htdocs/core/class/html.form.class.php
Expand Up @@ -6444,6 +6444,11 @@ function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$f
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)
{
Expand Down
5 changes: 0 additions & 5 deletions htdocs/core/lib/functions.lib.php
Expand Up @@ -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>';
Expand Down

0 comments on commit 35b6cb7

Please sign in to comment.