Remember selected charset in cookie.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2004-06-24 Michal Čihař <michal@cihar.com>
|
||||
* main.php, libraries/select_lang.lib.php: Remember selected charset in
|
||||
cookie.
|
||||
|
||||
2004-06-25 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||
* queryframe.php: Undefined index errors.
|
||||
|
||||
|
@@ -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
|
||||
|
3
main.php
3
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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user