summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_unbound_acls.php
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2014-01-29 21:51:33 +0200
committerWarren Baker <warren@decoy.co.za>2014-01-29 21:51:33 +0200
commit8fccab671fdade6b67cba2b5523ae2591f1d7425 (patch)
tree5b103ee2aac59161b2b82f4f7c2a96114851f7d1 /usr/local/www/services_unbound_acls.php
parent519597bcb1c34f44b03726c34bb4337f03e7ddd3 (diff)
downloadpfsense-8fccab671fdade6b67cba2b5523ae2591f1d7425.zip
pfsense-8fccab671fdade6b67cba2b5523ae2591f1d7425.tar.gz
Make sure ACLs are saved correctly
Diffstat (limited to 'usr/local/www/services_unbound_acls.php')
-rw-r--r--usr/local/www/services_unbound_acls.php42
1 files changed, 23 insertions, 19 deletions
diff --git a/usr/local/www/services_unbound_acls.php b/usr/local/www/services_unbound_acls.php
index 2bf4d53..08393ba 100644
--- a/usr/local/www/services_unbound_acls.php
+++ b/usr/local/www/services_unbound_acls.php
@@ -97,31 +97,35 @@ if ($_POST) {
}
if (!$input_errors) {
-
if ($pconfig['Submit'] == gettext("Save")) {
- if (!$a_acls[$id])
- $a_acls[$id]['aclid'] = $id;
-
- if (isset($id) && $a_acls[$id]) {
- $a_acls[$id]['aclid'] = $pconfig['aclid'];
- $a_acls[$id]['aclname'] = $pconfig['aclname'];
- $a_acls[$id]['aclaction'] = $pconfig['aclaction'];
- $a_acls[$id]['description'] = $pconfig['description'];
- $a_acls[$id]['row'] = array();
- foreach ($networkacl as $acl)
- $a_acls[$id]['row'][] = $acl;
- write_config();
- mark_subsystem_dirty("unbound");
- }
+ $acl_entry = array();
+ $acl_entry['aclid'] = $pconfig['aclid'];
+ $acl_entry['aclname'] = $pconfig['aclname'];
+ $acl_entry['aclaction'] = $pconfig['aclaction'];
+ $acl_entry['description'] = $pconfig['description'];
+ $acl_entry['aclid'] = $pconfig['aclid'];
+ $acl_entry['row'] = array();
+ foreach ($networkacl as $acl)
+ $acl_entry['row'][] = $acl;
+
+ if (isset($id) && $a_acls[$id])
+ $a_acls[$id] = $acl_entry;
+ else
+ $a_acls[] = $acl_entry;
+
+
+ mark_subsystem_dirty("unbound");
+ write_config();
+
pfSenseHeader("/services_unbound_acls.php");
exit;
}
if ($pconfig['apply']) {
- clear_subsystem_dirty("unbound");
- $retval = 0;
- $retval = services_unbound_configure();
- $savemsg = get_std_save_message($retval);
+ clear_subsystem_dirty("unbound");
+ $retval = 0;
+ $retval = services_unbound_configure();
+ $savemsg = get_std_save_message($retval);
}
}
}
OpenPOWER on IntegriCloud