mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Correctly set variable values during each iteration. Ticket #414. Spotted-by: irc(Efonne)
This commit is contained in:
parent
1c38875e1e
commit
ba9e9bbfed
@ -88,15 +88,20 @@ if($pkg['step'][$stepid]['stepsubmitbeforesave']) {
|
||||
|
||||
if ($_POST) {
|
||||
foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
|
||||
if($field['bindstofield'] <> "" and $field['type'] <> "submit") {
|
||||
if(!empty($field['bindstofield']) and $field['type'] <> "submit") {
|
||||
$fieldname = $field['name'];
|
||||
$unset_fields = "";
|
||||
$fieldname = ereg_replace(" ", "", $fieldname);
|
||||
$fieldname = strtolower($fieldname);
|
||||
// update field with posted values.
|
||||
if($field['unsetfield'] <> "") $unset_fields = "yes";
|
||||
if($field['arraynum'] <> "") $arraynum = $field['arraynum'];
|
||||
if($field['bindstofield'])
|
||||
if($field['unsetfield'] <> "")
|
||||
$unset_fields = "yes";
|
||||
else
|
||||
$unset_fields = "";
|
||||
if($field['arraynum'] <> "")
|
||||
$arraynum = $field['arraynum'];
|
||||
else
|
||||
$arraynum = "";
|
||||
if(!empty($field['bindstofield']))
|
||||
update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum, $field['type']);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user