Allow arrays to be ignored in hidden_fields()
This commit is contained in:
parent
cd64b707bd
commit
619b49c3d4
|
@ -747,15 +747,17 @@ 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
|
||||||
* @return null
|
* @return null
|
||||||
|
|
Loading…
Reference in a new issue