Skip to content

Commit

Permalink
fix generation of theme unique value
Browse files Browse the repository at this point in the history
refresh session cache for config after save
  • Loading branch information
piotrp committed Aug 4, 2010
1 parent 8b78fce commit a6b34a5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/Config.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,7 @@ function loadUserPreferences()
$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'];
Expand Down Expand Up @@ -712,7 +713,7 @@ function getThemeUniqueValue()
$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) : '');
Expand Down
2 changes: 2 additions & 0 deletions prefs_forms.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@
$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);
Expand Down
2 changes: 2 additions & 0 deletions prefs_manage.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@
} else {
$return_url = 'prefs_manage.php';
}
// reload config
$GLOBALS['PMA_Config']->loadUserPreferences();
PMA_userprefs_redirect($forms, $old_settings, $return_url, $params);
exit;
} else {
Expand Down

0 comments on commit a6b34a5

Please sign in to comment.