Merge pull request #15149 from defrance/patch-160

Display application Title if filled on login page
This commit is contained in:
Laurent Destailleur 2020-10-26 19:32:42 +01:00 committed by GitHub
commit 2340cb654d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,7 +52,14 @@ $arrayofjs = array(
'/includes/jstz/jstz.min.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION)),
'/core/js/dst.js'.(empty($conf->dol_use_jmobile) ? '' : '?version='.urlencode(DOL_VERSION))
);
$titleofloginpage = $langs->trans('Login').' @ '.$titletruedolibarrversion; // $titletruedolibarrversion is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page and find true dolibarr version.
// We display application title instead Login term
if (!empty($conf->global->MAIN_APPLICATION_TITLE)) {
$titleofloginpage = $conf->global->MAIN_APPLICATION_TITLE;
} else {
$titleofloginpage = $langs->trans('Login');
}
$titleofloginpage.= ' @ '.$titletruedolibarrversion; // $titletruedolibarrversion is defined by dol_loginfunction in security2.lib.php. We must keep the @, some tools use it to know it is login page and find true dolibarr version.
$disablenofollow = 1;
if (!preg_match('/'.constant('DOL_APPLICATION_TITLE').'/', $title)) $disablenofollow = 0;