From a2cdf7f2176959fd3d010c787d413f9934fe75cb Mon Sep 17 00:00:00 2001 From: William Desportes Date: Sun, 3 Jun 2018 14:13:54 +0200 Subject: Fix for #14295 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: #14295 Signed-off-by: William Desportes (cherry picked from commit a87bf74eed88b7e4b403cebad3a6c43321f03c68) Signed-off-by: MaurĂ­cio Meneghini Fauth --- index.php | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index 0ac91de52f..30ec98c32d 100644 --- a/index.php +++ b/index.php @@ -19,6 +19,7 @@ use PhpMyAdmin\Server\Select; use PhpMyAdmin\ThemeManager; use PhpMyAdmin\Url; use PhpMyAdmin\Util; +use PhpMyAdmin\UserPreferences; /** * Gets some core libraries and displays a top message if required @@ -82,6 +83,12 @@ if (isset($_POST['set_theme'])) { $tmanager = ThemeManager::getInstance(); $tmanager->setActiveTheme($_POST['set_theme']); $tmanager->setThemeCookie(); + + $userPreferences = new UserPreferences(); + $prefs = $userPreferences->load(); + $prefs["config_data"]["ThemeDefault"] = $_POST['set_theme']; + $userPreferences->save($prefs["config_data"]); + header('Location: index.php' . Url::getCommonRaw()); exit(); } -- cgit v1.2.3