Skip to content

Commit

Permalink
Reference right service reconfig function
Browse files Browse the repository at this point in the history
  • Loading branch information
Warren Baker committed Jan 29, 2014
1 parent 1319d0f commit 519597b
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions usr/local/www/services_unbound_acls.php
Expand Up @@ -53,7 +53,7 @@


unset($a_acls[$id]); unset($a_acls[$id]);
write_config(); write_config();
unbound_reconfigure(); services_unbound_configure();
$savemsg = gettext("Access List successfully deleted")."<br/>"; $savemsg = gettext("Access List successfully deleted")."<br/>";
} }


Expand All @@ -73,9 +73,9 @@
unset($input_errors); unset($input_errors);
$pconfig = $_POST; $pconfig = $_POST;


/* input validation - only allow 50 entries in a single ACL*/ // input validation - only allow 50 entries in a single ACL
for($x=0; $x<50; $x++) { for($x=0; $x<50; $x++) {
if(isset($pconfig["acl_network{$x}"])) { if (isset($pconfig["acl_network{$x}"])) {
$networkacl[$x] = array(); $networkacl[$x] = array();
$networkacl[$x]['acl_network'] = $pconfig["acl_network{$x}"]; $networkacl[$x]['acl_network'] = $pconfig["acl_network{$x}"];
$networkacl[$x]['mask'] = $pconfig["mask{$x}"]; $networkacl[$x]['mask'] = $pconfig["mask{$x}"];
Expand All @@ -99,7 +99,7 @@
if (!$input_errors) { if (!$input_errors) {


if ($pconfig['Submit'] == gettext("Save")) { if ($pconfig['Submit'] == gettext("Save")) {
if(!$a_acls[$id]) if (!$a_acls[$id])
$a_acls[$id]['aclid'] = $id; $a_acls[$id]['aclid'] = $id;


if (isset($id) && $a_acls[$id]) { if (isset($id) && $a_acls[$id]) {
Expand All @@ -112,7 +112,6 @@
$a_acls[$id]['row'][] = $acl; $a_acls[$id]['row'][] = $acl;
write_config(); write_config();
mark_subsystem_dirty("unbound"); mark_subsystem_dirty("unbound");
//unbound_reconfigure();
} }
pfSenseHeader("/services_unbound_acls.php"); pfSenseHeader("/services_unbound_acls.php");
exit; exit;
Expand All @@ -121,7 +120,7 @@
if ($pconfig['apply']) { if ($pconfig['apply']) {
clear_subsystem_dirty("unbound"); clear_subsystem_dirty("unbound");
$retval = 0; $retval = 0;
$retval = unbound_reconfigure(); $retval = services_unbound_configure();
$savemsg = get_std_save_message($retval); $savemsg = get_std_save_message($retval);
} }
} }
Expand Down Expand Up @@ -176,15 +175,13 @@ function mask_field(fieldname, fieldsize, n) {
<tbody> <tbody>
<tr> <tr>
<td class="tabnavtbl"> <td class="tabnavtbl">
<ul id="tabnav">
<?php <?php
$tab_array = array(); $tab_array = array();
$tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php"); $tab_array[] = array(gettext("General Settings"), false, "/services_unbound.php");
$tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php"); $tab_array[] = array(gettext("Advanced settings"), false, "services_unbound_advanced.php");
$tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php"); $tab_array[] = array(gettext("Access Lists"), true, "/services_unbound_acls.php");
display_top_tabs($tab_array, true); display_top_tabs($tab_array, true);
?> ?>
</ul>
</td> </td>
</tr> </tr>
<tr> <tr>
Expand Down

0 comments on commit 519597b

Please sign in to comment.