add hook "changeHelpURL" to modify target of the help button

This commit is contained in:
Christian Foellmann 2022-06-28 13:28:31 +02:00
parent 1d354aa844
commit 2981b268ae

View File

@ -1309,7 +1309,7 @@ if (!function_exists("llxHeader")) {
*/
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0)
{
global $conf;
global $conf, $hookmanager;
// html header
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow);
@ -1329,6 +1329,12 @@ if (!function_exists("llxHeader")) {
print '<body id="mainbody" class="'.$tmpcsstouse.'">'."\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')) {
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url);