summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-06-11 11:59:29 +0000
committerErmal <eri@pfsense.org>2010-06-11 11:59:29 +0000
commita4f07557b4fae0811fbfbc3dcd32abc6a3fab61d (patch)
treedf4a777ed40c3cab9dee000d7123c61ae43c9709 /usr/local/www/wizard.php
parentd40b2a88040289626ef1d96eb1b088e691510edb (diff)
downloadpfsense-a4f07557b4fae0811fbfbc3dcd32abc6a3fab61d.zip
pfsense-a4f07557b4fae0811fbfbc3dcd32abc6a3fab61d.tar.gz
Ticket #642. Fix logic for the wizard code to unset and arraynum usage.
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php19
1 files changed, 7 insertions, 12 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 8c2ae36..6e8c4f7 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -129,11 +129,13 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type
$field_conv .= "['" . $f . "']";
if($field_conv == "")
return;
+ if ($arraynum <> "")
+ $field_conf .= "[" . $arraynum . "]";
if(($field_type == "checkbox" and $updatetext <> "on") || $updatetext == "") {
/*
- item is a checkbox, it should have the value "on"
- if it was checked
- */
+ * item is a checkbox, it should have the value "on"
+ * if it was checked
+ */
$text = "unset(\$config" . $field_conv . ");";
eval($text);
return;
@@ -150,16 +152,9 @@ function update_config_field($field, $updatetext, $unset, $arraynum, $field_type
if($unset <> "") {
$text = "unset(\$config" . $field_conv . ");";
eval($text);
- $text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";";
- eval($text);
- } else {
- if($arraynum <> "") {
- $text = "\$config" . $field_conv . "[" . $arraynum . "] = \"" . $updatetext . "\";";
- } else {
- $text = "\$config" . $field_conv . " = \"" . $updatetext . "\";";
- }
- eval($text);
}
+ $text = "\$config" . $field_conv . " = \"" . $updatetext . "\";";
+ eval($text);
}
// handle before form display event.
OpenPOWER on IntegriCloud