diff --git a/ChangeLog b/ChangeLog index eca42af81a7..4ae175c119f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -231,6 +231,7 @@ WARNING: -------- The following changes may create regressions for some external modules, but were necessary to make Dolibarr better: +* The hook changeHelpURL is replaced by llxHeader * The property ->brouillon has been removed from all classes. It was not reliable and was a duplicate of ->status == self::STATUS_DRAFT. * The duplicated and deprecated property ->date_livraison that was renamed into ->delivery_date has been completely removed. * The property ->user_close to store ID of closing user has been renamed into ->user_closing_id. diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 654648a35f7..9a1c6f49d6d 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1460,6 +1460,28 @@ if (!function_exists("llxHeader")) { { global $conf, $hookmanager; + $parameters = array( + 'head' =>& $head, + 'title' =>& $title, + 'help_url' =>& $help_url, + 'target' =>& $target, + 'disablej' =>& $disablej, + 'disablehea' =>& $disablehea, + 'arrayofjs' =>& $arrayofjs, + 'arrayofcss' =>& $arrayofcss, + 'morequerystring' =>& $morequerystring, + 'morecssonbody' =>& $morecssonbody, + 'replacemainareaby' =>& $replacemainareaby, + 'disablenofollow' =>& $disablenofollow, + 'disablenoindex' =>& $disablenoindex + + ); + $reshook = $hookmanager->executeHooks('llxHeader', $parameters); + if ($reshook > 0) { + print $hookmanager->resPrint; + return; + } + // html header top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow, $disablenoindex); @@ -1478,12 +1500,6 @@ if (!function_exists("llxHeader")) { print ''."\n"; - $parameters = array('help_url' => $help_url); - $reshook = $hookmanager->executeHooks('changeHelpURL', $parameters); - if ($reshook > 0) { - $help_url = $hookmanager->resPrint; - } - // top menu and left menu area if ((empty($conf->dol_hide_topmenu) || GETPOST('dol_invisible_topmenu', 'int')) && !GETPOST('dol_openinpopup', 'aZ09')) { top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url);