1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-28 07:41:55 +03:00

Patch for issue #14348

Closes: #14348
Signed-off-by: William Desportes <williamdes@wdes.fr>
This commit is contained in:
William Desportes
2018-06-03 01:40:55 +02:00
parent 2a34c01863
commit d26f7e47fb

View File

@@ -90,6 +90,8 @@ class ThemeManager
$this->theme = new Theme;
$config_theme_exists = true;
if (! $this->checkTheme($GLOBALS['cfg']['ThemeDefault'])) {
trigger_error(
sprintf(
@@ -98,15 +100,16 @@ class ThemeManager
),
E_USER_ERROR
);
$GLOBALS['cfg']['ThemeDefault'] = false;
$config_theme_exists = false;
} else {
$this->theme_default = $GLOBALS['cfg']['ThemeDefault'];
}
$this->theme_default = $GLOBALS['cfg']['ThemeDefault'];
// check if user have a theme cookie
$cookie_theme = $this->getThemeCookie();
if (! $cookie_theme || ! $this->setActiveTheme($cookie_theme)) {
if ($GLOBALS['cfg']['ThemeDefault']) {
if ($config_theme_exists) {
// otherwise use default theme
$this->setActiveTheme($this->theme_default);
} else {