aboutsummaryrefslogtreecommitdiffstats
path: root/config/unbound/unbound_acls.php
diff options
context:
space:
mode:
authorWarren Baker <warren@decoy.co.za>2011-12-19 21:57:08 +0200
committerWarren Baker <warren@decoy.co.za>2011-12-19 21:57:08 +0200
commit93c5ed2ff6f7600359528235d5b3160f33499537 (patch)
treeefe4e78c0e0d17166bbfc0f78cfd8633d3e17c5d /config/unbound/unbound_acls.php
parentd74b525be80b548455927cd891e530d32dde14eb (diff)
downloadpfsense-packages-93c5ed2ff6f7600359528235d5b3160f33499537.tar.gz
pfsense-packages-93c5ed2ff6f7600359528235d5b3160f33499537.tar.bz2
pfsense-packages-93c5ed2ff6f7600359528235d5b3160f33499537.zip
make use of an apply button and use pfSenseHeader() instead
Diffstat (limited to 'config/unbound/unbound_acls.php')
-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