diff --git a/ChangeLog b/ChangeLog index dd2c996c7..1b4e09fe7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - ChangeLog $Id$ $Source$ +2006-08-30 Marc Delisle + * libraries/common.lib.php: bug #1542865, themes not switching + when ThemePerServer is true + 2006-08-30 Michal Čihař * libraries/common.lib.php, lang/*: Internationalise link to MySQL documentation when translation exists, this needs to be defined in diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 0b20e9bd1..685a1583b 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -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)) {