bug #1542865, themes not switching

This commit is contained in:
Marc Delisle
2006-08-30 21:55:59 +00:00
parent 081e4be128
commit 8cf7947219
2 changed files with 15 additions and 2 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog
$Id$
$Source$
2006-08-30 Marc Delisle <lem9@users.sourceforge.net>
* libraries/common.lib.php: bug #1542865, themes not switching
when ThemePerServer is true
2006-08-30 Michal Čihař <michal@cihar.com>
* libraries/common.lib.php, lang/*: Internationalise link to MySQL
documentation when translation exists, this needs to be defined in

View File

@@ -3074,8 +3074,18 @@ if (! isset($_SESSION['PMA_Theme_Manager'])) {
$_SESSION['PMA_Theme_Manager']->checkConfig();
}
// for the theme per server feature
if (isset($_REQUEST['server']) && !isset($_REQUEST['set_theme'])) {
$GLOBALS['server'] = $_REQUEST['server'];
$tmp = $_SESSION['PMA_Theme_Manager']->getThemeCookie();
if (empty($tmp)) {
$tmp = $_SESSION['PMA_Theme_Manager']->theme_default;
}
$_SESSION['PMA_Theme_Manager']->setActiveTheme($tmp);
unset($tmp);
}
if (isset($_REQUEST['set_theme'])) {
// if user submit a theme
// if user selected a theme
$_SESSION['PMA_Theme_Manager']->setActiveTheme($_REQUEST['set_theme']);
}
@@ -3362,7 +3372,6 @@ if (! defined('PMA_MINIMUM_COMMON')) {
PMA_setCookie('pma_collation_connection', $GLOBALS['collation_connection']);
$_SESSION['PMA_Theme_Manager']->setThemeCookie();
} // end if !defined('PMA_MINIMUM_COMMON')
if (!empty($__redirect) && in_array($__redirect, $goto_whitelist)) {