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(); }