diff --git a/ChangeLog b/ChangeLog index 15045960a..172402ec7 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,7 +7,9 @@ $Source$ 2006-05-05 Michal Čihař * libraries/export/sql.php: Fix UPDATE export with extended inserts - enabled (bug#1482103), fix export type selection. + enabled (bug #1482103), fix export type selection. + * libraries/select_lang.lib.php: Use GET and POST explicitely as cookies + can override values in REQUEST (bug #1481584). 2006-05-03 Michal Čihař * Documentation.html: Document OpenDocument export and various fixes. diff --git a/libraries/select_lang.lib.php b/libraries/select_lang.lib.php index f618766e9..31a7a29dc 100644 --- a/libraries/select_lang.lib.php +++ b/libraries/select_lang.lib.php @@ -34,12 +34,22 @@ function PMA_langCheck() } } - // check user requested language - if (! empty($_REQUEST['lang'])) { - if (PMA_langSet($_REQUEST['lang'])) { + // Don't use REQUEST in following code as it might be confused by cookies with same name + // check user requested language (POST) + if (! empty($_POST['lang'])) { + if (PMA_langSet($_POST['lang'])) { return true; } else { - $GLOBALS['lang_failed_request'] = $_REQUEST['lang']; + $GLOBALS['lang_failed_request'] = $_POST['lang']; + } + } + + // check user requested language (GET) + if (! empty($_GET['lang'])) { + if (PMA_langSet($_GET['lang'])) { + return true; + } else { + $GLOBALS['lang_failed_request'] = $_GET['lang']; } }