summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2004-12-18 21:34:40 +0000
committerScott Ullrich <sullrich@pfsense.org>2004-12-18 21:34:40 +0000
commit9b8837be0628830b0eab2d36fde737e6848489c5 (patch)
tree8557e38ba825625a05cfce249b4f6b604f52e81d /usr
parenta8df0181a7c5fdeac31c60847efc0594a041405c (diff)
downloadpfsense-9b8837be0628830b0eab2d36fde737e6848489c5.zip
pfsense-9b8837be0628830b0eab2d36fde737e6848489c5.tar.gz
Move the "User has been added." save message to the XML file where it belongs.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/pkg_edit.php13
-rwxr-xr-xusr/local/www/wizard.php2
2 files changed, 8 insertions, 7 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index a407672..f926dc9 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -58,7 +58,7 @@ $title = $section . ": Edit " . $package_name;
$id = $_GET['id'];
if (isset($_POST['id']))
$id = $_POST['id'];
-
+
$a_pkg = &$config['installedpackages']['package'];
if (isset($id) && $a_pkg[$id]) {
@@ -78,7 +78,6 @@ if ($_POST) {
} else {
if($pkg['custom_add_php_command']) {
eval($pkg['custom_add_php_command']);
- $savemsg = "User has been added.";
}
// XXX: add the xml value to config
}
@@ -87,19 +86,19 @@ if ($_POST) {
// store values in xml configration file.
if (!$input_errors) {
$pkgarr = array();
-
+
if (isset($id) && $a_pkg[$id])
$a_pkg[$id] = $pkgarr;
else
$a_pkg[] = $pkgarr;
-
+
foreach ($pkg['fields'] as $fields) {
$pkgarr[$fields['fieldname']] = $fields['fieldname'];
- $pkgarr[$fields['fieldvalue']] = $_POST[$fields['fieldname']];
+ $pkgarr[$fields['fieldvalue']] = $_POST[$fields['fieldname']];
}
-
+
$config['installedpackages']['package']['config'][] = $filterent;
-
+
write_config();
}
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 5e4c99c..df6f24c 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -138,6 +138,8 @@ function update_config_field($field, $updatetext, $unset) {
$arraynum = "";
$field_conv = "";
$field_split = split("->", $field['bindstofield']);
+ // arraynum is used in cases where there is an array of the same field
+ // name such as dnsserver (2 of them)
if($field['arraynum'] <> "") $arraynum = "[" . $field['arraynum'] . "]";
foreach ($field_split as $f) $field_conv .= "['" . $f . "']";
$toeval = "\$value = \$config" . $field_conv . $arraynum . ";";
OpenPOWER on IntegriCloud