summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2010-03-10 10:00:44 +0000
committerErmal Luçi <eri@pfsense.org>2010-03-10 10:00:44 +0000
commitba9e9bbfed4bfafbc980ae348e1fc365c8c4ee8d (patch)
treed6ac6e09fc90b17c40395e19ac802dba2f180824 /usr
parent1c38875e1e4ad52c3e10a5700f23ad2dcf6d398c (diff)
downloadpfsense-ba9e9bbfed4bfafbc980ae348e1fc365c8c4ee8d.zip
pfsense-ba9e9bbfed4bfafbc980ae348e1fc365c8c4ee8d.tar.gz
Correctly set variable values during each iteration. Ticket #414. Spotted-by: irc(Efonne)
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/wizard.php15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index f50d469..88da606 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -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']);
}
OpenPOWER on IntegriCloud