]> git.joonet.de Git - adminer.git/commitdiff
Simpler $_POST iteration
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 10 Aug 2007 10:35:09 +0000 (10:35 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Fri, 10 Aug 2007 10:35:09 +0000 (10:35 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@325 7c3ca157-0c34-0410-bff1-cbf682f78f5c

auth.inc.php

index 28b853d31ccd4a502f309c5c784f2068e039e8b6..ae0198c52a5c7fa489e703da15aa95fdc83270d5 100644 (file)
@@ -54,16 +54,11 @@ function auth_error() {
        </table>
        <p>
 <?php
-       foreach ($_POST as $key => $val) { // expired session
+       $process = $_POST; // expired session
+       while (list($key, $val) = each($process)) {
                if (is_array($val)) {
-                       foreach ($val as $key2 => $val2) {
-                               if (!is_array($val2)) {
-                                       echo '<input type="hidden" name="' . htmlspecialchars($key . "[$key2]") . '" value="' . htmlspecialchars($val2) . '" />';
-                               } else {
-                                       foreach ($val2 as $key3 => $val3) {
-                                               echo '<input type="hidden" name="' . htmlspecialchars($key . "[$key2][$key3]") . '" value="' . htmlspecialchars($val3) . '" />';
-                                       }
-                               }
+                       foreach ($val as $k => $v) {
+                               $process[$key . "[$k]"] = $v;
                        }
                } elseif (!in_array($key, $ignore)) {
                        echo '<input type="hidden" name="' . htmlspecialchars($key) . '" value="' . htmlspecialchars($val) . '" />';