Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2018-06-03 15:13:54 +0300
committerMaurĂ­cio Meneghini Fauth <mauriciofauth@gmail.com>2018-08-28 11:06:15 +0300
commita2cdf7f2176959fd3d010c787d413f9934fe75cb (patch)
tree1eee8aca47277f22f1dc1e4f68da7e84b5db2e91 /index.php
parentc8dce83e44b480606f672dae73e2f47d350774cf (diff)
Fix for #14295
Fixes: #14295 Signed-off-by: William Desportes <williamdes@wdes.fr> (cherry picked from commit a87bf74eed88b7e4b403cebad3a6c43321f03c68) Signed-off-by: MaurĂ­cio Meneghini Fauth <mauriciofauth@gmail.com>
Diffstat (limited to 'index.php')
-rw-r--r--index.php7
1 files changed, 7 insertions, 0 deletions
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();
}