diff --git a/ChangeLog b/ChangeLog index 6e81d6947..10bfbbda2 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2004-06-24 Michal Čihař + * main.php, libraries/select_lang.lib.php: Remember selected charset in + cookie. + 2004-06-25 Alexander M. Turek * queryframe.php: Undefined index errors. diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index 4f80ac428..ae604e527 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -296,7 +296,11 @@ if (empty($lang)) { // 4. Checks whether charset recoding should be allowed or not $allow_recoding = FALSE; // Default fallback value if (!isset($convcharset) || empty($convcharset)) { - $convcharset = $cfg['DefaultCharset']; + if (isset($_COOKIE['pma_charset'])) { + $convcharset = $_COOKIE['pma_charset']; + } else { + $convcharset = $cfg['DefaultCharset']; + } } // 5. Defines the associated filename and load the translation diff --git a/main.php b/main.php index 1ecc9e550..53a694abc 100644 --- a/main.php +++ b/main.php @@ -19,6 +19,9 @@ if (!isset($pma_uri_parts)) { $is_https = (isset($pma_uri_parts['scheme']) && $pma_uri_parts['scheme'] == 'https') ? 1 : 0; } setcookie('pma_lang', $lang, time() + 60*60*24*30, $cookie_path, '', $is_https); +if (isset($convcharset)) { + setcookie('pma_charset', $convcharset, time() + 60*60*24*30, $cookie_path, '', $is_https); +} /** * Includes the ThemeManager */