Merge pull request #21401 from cfoellmann/PR/hook-filter-helpurl

NEW hook "changeHelpURL" to modify target of the help button
This commit is contained in:
Laurent Destailleur 2022-07-06 14:59:42 +02:00 committed by GitHub
commit 0e52c4d0d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1349,7 +1349,7 @@ if (!function_exists("llxHeader")) {
*/
function llxHeader($head = '', $title = '', $help_url = '', $target = '', $disablejs = 0, $disablehead = 0, $arrayofjs = '', $arrayofcss = '', $morequerystring = '', $morecssonbody = '', $replacemainareaby = '', $disablenofollow = 0, $disablenoindex = 0)
{
global $conf;
global $conf, $hookmanager;
// html header
top_htmlhead($head, $title, $disablejs, $disablehead, $arrayofjs, $arrayofcss, 0, $disablenofollow, $disablenoindex);
@ -1369,6 +1369,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')) && !GETPOST('dol_openinpopup', 'aZ09')) {
top_menu($head, $title, $target, $disablejs, $disablehead, $arrayofjs, $arrayofcss, $morequerystring, $help_url);