fix generation of theme unique value
refresh session cache for config after save
This commit is contained in:
@@ -458,6 +458,7 @@ class PMA_Config
|
||||
$config_data = $_SESSION['cache'][$cache_key]['userprefs'];
|
||||
// type is 'db' or 'session'
|
||||
$this->set('user_preferences', $_SESSION['cache'][$cache_key]['userprefs_type']);
|
||||
$this->set('user_preferences_mtime', $_SESSION['cache'][$cache_key]['userprefs_mtime']);
|
||||
|
||||
// backup some settings
|
||||
$org_fontsize = $this->settings['fontsize'];
|
||||
@@ -712,7 +713,7 @@ class PMA_Config
|
||||
$fontsize +
|
||||
$this->source_mtime +
|
||||
$this->default_source_mtime +
|
||||
(isset($_SESSION['cache']['userprefs_mtime']) ? $_SESSION['cache']['userprefs_mtime'] : 0) +
|
||||
$this->get('user_preferences_mtime') +
|
||||
$_SESSION['PMA_Theme']->mtime_info +
|
||||
$_SESSION['PMA_Theme']->filesize_info)
|
||||
. (isset($_SESSION['tmp_user_values']['custom_color']) ? substr($_SESSION['tmp_user_values']['custom_color'],1,6) : '');
|
||||
|
@@ -52,6 +52,8 @@ if ($form_display->process(false) && !$form_display->hasErrors()) {
|
||||
$old_settings = PMA_load_userprefs();
|
||||
$result = PMA_save_userprefs(ConfigFile::getInstance()->getConfigArray());
|
||||
if ($result === true) {
|
||||
// reload config
|
||||
$GLOBALS['PMA_Config']->loadUserPreferences();
|
||||
$hash = ltrim(filter_input(INPUT_POST, 'tab_hash'), '#');
|
||||
PMA_userprefs_redirect($forms, $old_settings, 'prefs_forms.php', array(
|
||||
'form' => $form_param), $hash);
|
||||
|
@@ -175,6 +175,8 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
|
||||
} else {
|
||||
$return_url = 'prefs_manage.php';
|
||||
}
|
||||
// reload config
|
||||
$GLOBALS['PMA_Config']->loadUserPreferences();
|
||||
PMA_userprefs_redirect($forms, $old_settings, $return_url, $params);
|
||||
exit;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user