summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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