From: jakubvrana Date: Fri, 3 Oct 2008 13:15:58 +0000 (+0000) Subject: Choose language through option-list X-Git-Tag: v3.0.0~1001 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=5d7071a539d3dce780d3ff53a14b458be7c7d41a;p=adminer.git Choose language through option-list git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@517 7c3ca157-0c34-0410-bff1-cbf682f78f5c --- diff --git a/auth.inc.php b/auth.inc.php index eeb847e5..e0f3da42 100644 --- a/auth.inc.php +++ b/auth.inc.php @@ -49,16 +49,7 @@ function auth_error() {

$v) { - $process[$key . "[$k]"] = $v; - } - } elseif (!in_array($key, $ignore)) { - echo ''; - } - } + hidden_fields($_POST, $ignore); // expired session foreach ($_FILES as $key => $val) { echo ''; } diff --git a/functions.inc.php b/functions.inc.php index 1a47daec..061d49f1 100644 --- a/functions.inc.php +++ b/functions.inc.php @@ -340,3 +340,15 @@ function table_comment(&$row) { $row["Comment"] = preg_replace('~(?:(.+); )?InnoDB free: .*~', '\\1', $row["Comment"]); } } + +function hidden_fields($process, $ignore) { + while (list($key, $val) = each($process)) { + if (is_array($val)) { + foreach ($val as $k => $v) { + $process[$key . "[$k]"] = $v; + } + } elseif (!in_array($key, $ignore)) { + echo ''; + } + } +} diff --git a/lang.inc.php b/lang.inc.php index 017f383f..a6e6f57b 100644 --- a/lang.inc.php +++ b/lang.inc.php @@ -29,13 +29,14 @@ function lang($idf, $number = null) { } function switch_lang() { - global $langs; - echo "

" . lang('Language') . ":"; - $base = remove_from_uri("lang"); + global $LANG, $langs; + echo "

\n
"; + hidden_fields($_GET, array('lang')); + echo lang('Language') . ": \n\n
\n
\n"; } if (isset($_GET["lang"])) {