1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-08 23:57:29 +02:00

Allow arrays to be ignored in hidden_fields()

This commit is contained in:
Jakub Vrana
2014-03-21 22:45:38 -07:00
parent cd64b707bd
commit 619b49c3d4

View File

@@ -747,14 +747,16 @@ function friendly_url($val) {
*/ */
function hidden_fields($process, $ignore = array()) { function hidden_fields($process, $ignore = array()) {
while (list($key, $val) = each($process)) { while (list($key, $val) = each($process)) {
if (!in_array($key, $ignore)) {
if (is_array($val)) { if (is_array($val)) {
foreach ($val as $k => $v) { foreach ($val as $k => $v) {
$process[$key . "[$k]"] = $v; $process[$key . "[$k]"] = $v;
} }
} elseif (!in_array($key, $ignore)) { } else {
echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">'; echo '<input type="hidden" name="' . h($key) . '" value="' . h($val) . '">';
} }
} }
}
} }
/** Print hidden fields for GET forms /** Print hidden fields for GET forms