diff --git a/ChangeLog b/ChangeLog index 7de815674..7967d8c88 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-07-14 Marc Delisle + * index.php, libraries/common.lib.php: bug 989581 and left panel + display problems when switching themes + 2004-07-13 Michal Čihař * lang/czech: Updated. diff --git a/index.php b/index.php index 45c214e86..018335ea4 100644 --- a/index.php +++ b/index.php @@ -63,15 +63,22 @@ $phpmain_hash_js = time(); 0) { PMA_availableDatabases(); // this function is defined in "common.lib.php" @@ -80,12 +87,9 @@ if ($server > 0) { } if ($num_dbs > 1) { if ($cfg['LeftFrameLight']) { - $query_frame_height = $query_frame_height + 40; + $query_frame_height += 20; } } -if ($cfg['LeftDisplayLogo']) { - $query_frame_height = $query_frame_height + 50; -} if ($cfg['QueryFrame']) { /* Will we show list of servers? */ if ($cfg['LeftDisplayServers'] && $cfg['DisplayServersList'] && count($cfg['Servers']) > 1) { diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 804f974bd..541b1ed3a 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -321,9 +321,15 @@ if (!isset($_COOKIE['pma_theme']) || empty($_COOKIE['pma_theme'])){ $pmaThemeImage = './' . $cfg['ThemePath'] . '/original/img/'; } } else { - $GLOBALS['theme'] = $_COOKIE['pma_theme']; - $pmaThemeImage = './' . $cfg['ThemePath'] . '/' . $_COOKIE['pma_theme'] . '/img/'; - $tmp_layout_file = './' . $cfg['ThemePath'] . '/' . PMA_securePath($_COOKIE['pma_theme']) . '/layout.inc.php'; + // if we just changed theme, we must take the new one so that + // index.php takes the correct one for height computing + if (isset($_POST['set_theme'])) { + $GLOBALS['theme'] = $_POST['set_theme']; + } else { + $GLOBALS['theme'] = $_COOKIE['pma_theme']; + } + $pmaThemeImage = './' . $cfg['ThemePath'] . '/' . $_GLOBALS['theme'] . '/img/'; + $tmp_layout_file = './' . $cfg['ThemePath'] . '/' . PMA_securePath($_GLOBALS['theme']) . '/layout.inc.php'; if (@file_exists($tmp_layout_file)) { include($tmp_layout_file); }