From d5ed29c5678312247d170043cd1faae46de941fa Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Sun, 25 Mar 2018 12:13:29 +0200 Subject: [PATCH] NEW add "moreHtmlRef" hook --- htdocs/core/lib/functions.lib.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index e18a0f111ff..2d20f1bb447 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1292,7 +1292,8 @@ function dol_get_fiche_end($notab=0) */ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='rowid', $fieldref='ref', $morehtmlref='', $moreparam='', $nodbprefix=0, $morehtmlleft='', $morehtmlstatus='', $onlybanner=0, $morehtmlright='') { - global $conf, $form, $user, $langs; + global $conf, $user, $langs; + global $form, $hookmanager; $error = 0; @@ -1552,6 +1553,11 @@ 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 '
';