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"])) {