]> git.joonet.de Git - adminer.git/commitdiff
Allow arrays to be ignored in hidden_fields()
authorJakub Vrana <jakub@vrana.cz>
Sat, 22 Mar 2014 05:45:38 +0000 (22:45 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sat, 22 Mar 2014 05:45:38 +0000 (22:45 -0700)
adminer/include/functions.inc.php

index 117248cbfa6eef0886249020e2c760a6778f3e12..9ecd43b691eb4f125bee32bdfa05eb4cc828210e 100644 (file)
@@ -747,12 +747,14 @@ function friendly_url($val) {
 */
 function hidden_fields($process, $ignore = array()) {
        while (list($key, $val) = each($process)) {
-               if (is_array($val)) {
-                       foreach ($val as $k => $v) {
-                               $process[$key . "[$k]"] = $v;
+               if (!in_array($key, $ignore)) {
+                       if (is_array($val)) {
+                               foreach ($val as $k => $v) {
+                                       $process[$key . "[$k]"] = $v;
+                               }
+                       } else {
+                               echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
                        }
-               } elseif (!in_array($key, $ignore)) {
-                       echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
                }
        }
 }