Remember selected charset in cookie.
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$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>
|
2004-06-25 Alexander M. Turek <rabus@users.sourceforge.net>
|
||||||
* queryframe.php: Undefined index errors.
|
* queryframe.php: Undefined index errors.
|
||||||
|
|
||||||
|
@@ -296,8 +296,12 @@ if (empty($lang)) {
|
|||||||
// 4. Checks whether charset recoding should be allowed or not
|
// 4. Checks whether charset recoding should be allowed or not
|
||||||
$allow_recoding = FALSE; // Default fallback value
|
$allow_recoding = FALSE; // Default fallback value
|
||||||
if (!isset($convcharset) || empty($convcharset)) {
|
if (!isset($convcharset) || empty($convcharset)) {
|
||||||
|
if (isset($_COOKIE['pma_charset'])) {
|
||||||
|
$convcharset = $_COOKIE['pma_charset'];
|
||||||
|
} else {
|
||||||
$convcharset = $cfg['DefaultCharset'];
|
$convcharset = $cfg['DefaultCharset'];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 5. Defines the associated filename and load the translation
|
// 5. Defines the associated filename and load the translation
|
||||||
$lang_file = $lang_path . $available_languages[$lang][1] . '.inc.php';
|
$lang_file = $lang_path . $available_languages[$lang][1] . '.inc.php';
|
||||||
|
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;
|
$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);
|
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
|
* Includes the ThemeManager
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user