From 35b6cb750fa4f1052b38624c01a80f7a81b37425 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Tue, 27 Mar 2018 17:36:25 +0200 Subject: [PATCH] Fix: move "moreHtmlRef" hook in "showrefnav" function --- htdocs/core/class/html.form.class.php | 5 +++++ htdocs/core/lib/functions.lib.php | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 466faba295e28..d53072efe0a9c 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6444,6 +6444,11 @@ function showrefnav($object,$paramid,$morehtml='',$shownav=1,$fieldid='rowid',$f else $morehtmlstatus=$hookmanager->resPrint; if ($morehtmlstatus) $ret.='
'.$morehtmlstatus.'
'; + $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) { diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f58d733a4e6bc..d908f60b35a58 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1554,11 +1554,6 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r $morehtmlref.=''; } - $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 '
'; print $form->showrefnav($object, $paramid, $morehtml, $shownav, $fieldid, $fieldref, $morehtmlref, $moreparam, $nodbprefix, $morehtmlleft, $morehtmlstatus, $morehtmlright); print '
';