aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound
diff options
context:
space:
mode:
Diffstat (limited to 'config/unbound')
-rw-r--r--config/unbound/unbound_acls.php50
1 files changed, 31 insertions, 19 deletions
diff --git a/config/unbound/unbound_acls.php b/config/unbound/unbound_acls.php
index 7e4e5a71..a7c3ea9e 100644
--- a/config/unbound/unbound_acls.php
+++ b/config/unbound/unbound_acls.php
@@ -98,22 +98,32 @@ if ($_POST) {
if (!$input_errors) {
- 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();
- unbound_reconfigure();
+ 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");
+ //unbound_reconfigure();
+ }
+ pfSenseHeader("/unbound_acls.php");
+ exit;
+ }
+
+ if ($pconfig['apply']) {
+ clear_subsystem_dirty("unbound");
+ $retval = 0;
+ $retval = unbound_reconfigure();
+ $savemsg = get_std_save_message($retval);
}
- header("Location: unbound_acls.php");
- exit;
}
}
@@ -148,6 +158,7 @@ include("head.inc");
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
<?php include("fbegin.inc"); ?>
+<form action="unbound_acls.php" method="post" name="iform" id="iform">
<?php
if (!$savemsg)
$savemsg = "";
@@ -157,6 +168,9 @@ if ($input_errors)
if ($savemsg)
print_info_box($savemsg);
+
+if (is_subsystem_dirty("unbound"))
+ print_info_box_np(gettext("The settings for Unbound DNS has changed. You must apply the configuration to take affect."));
?>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
@@ -178,7 +192,7 @@ if ($savemsg)
<?php if($act=="new" || $act=="edit"): ?>
- <form action="unbound_acls.php" method="post" name="iform" id="iform">
+
<input name="aclid" type="hidden" value="<?=$id;?>">
<input name="act" type="hidden" value="<?=$act;?>">
@@ -361,6 +375,4 @@ if ($savemsg)
</tr>
</table>
</body>
-<?php include("fend.inc"); ?>
-
-?> \ No newline at end of file
+<?php include("fend.inc"); ?> \ No newline at end of file