From a961bb550778467d19bf9edc58f1eee88fa2cec7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 28 May 2022 11:31:41 +0200 Subject: [PATCH] Debug v16 --- htdocs/core/tpl/login.tpl.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index ccec4352e89..175fb080818 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2011-2021 Laurent Destailleur + * Copyright (C) 2011-2022 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -18,7 +18,7 @@ // Need global variable $urllogo, $title and $titletruedolibarrversion to be defined by caller (like dol_loginfunction in security2.lib.php) // Caller can also set $morelogincontent = array(['options']=>array('js'=>..., 'table'=>...); - +// $titletruedolibarrversion must be defined if (!defined('NOBROWSERNOTIF')) { define('NOBROWSERNOTIF', 1); @@ -71,6 +71,9 @@ $php_self .= dol_escape_htmltag($_SERVER["QUERY_STRING"]) ? '?'.dol_escape_htmlt if (!preg_match('/mainmenu=/', $php_self)) { $php_self .= (preg_match('/\?/', $php_self) ? '&' : '?').'mainmenu=home'; } +if (preg_match('/'.preg_quote('core/modules/oauth', '/').'/', $php_self)) { + $php_self = DOL_URL_ROOT.'/index.php?mainmenu=home'; +} // Javascript code on logon page only to detect user tz, dst_observed, dst_first, dst_second $arrayofjs = array(