diff --git a/htdocs/core/class/hookmanager.class.php b/htdocs/core/class/hookmanager.class.php index cd33f1d8d02..439e31caae1 100644 --- a/htdocs/core/class/hookmanager.class.php +++ b/htdocs/core/class/hookmanager.class.php @@ -186,7 +186,8 @@ class HookManager 'sendMail', 'sendMailAfter', 'showLinkToObjectBlock', - 'setContentSecurityPolicy' + 'setContentSecurityPolicy', + 'setHtmlTitle' ) )) $hooktype='addreplace'; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index 770d35d1ab3..826f83356c4 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -1154,7 +1154,7 @@ function top_httphead($contenttype='text/html', $forcenocache=0) */ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $disablejmobile=0, $disablenofollow=0) { - global $user, $conf, $langs, $db; + global $db, $conf, $langs, $user, $hookmanager; top_httphead(); @@ -1188,9 +1188,22 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs $appli=constant('DOL_APPLICATION_TITLE'); if (!empty($conf->global->MAIN_APPLICATION_TITLE)) $appli=$conf->global->MAIN_APPLICATION_TITLE; - if ($title && ! empty($conf->global->MAIN_HTML_TITLE) && preg_match('/noapp/',$conf->global->MAIN_HTML_TITLE)) print '