diff options
Diffstat (limited to 'usr')
-rwxr-xr-x | usr/local/www/firewall_rules.php | 21 | ||||
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 2 | ||||
-rw-r--r-- | usr/local/www/system_certmanager.php | 4 |
3 files changed, 14 insertions, 13 deletions
diff --git a/usr/local/www/firewall_rules.php b/usr/local/www/firewall_rules.php index 24dfb2c..af0fedb 100755 --- a/usr/local/www/firewall_rules.php +++ b/usr/local/www/firewall_rules.php @@ -70,14 +70,17 @@ function check_for_advaned_options(&$item) { return $item_set; } -function delete_nat_association(&$a_nat, $id) { - if (!$id || !is_array($a_nat)) +function delete_nat_association($id) { + global $config; + + if (!$id || !is_array($config['nat']['rule'])) return; - for ($pos = 0; $pos < sizeof($a_nat); $pos++) { - if ($a_nat[$pos]['associated-rule-id'] == $id) - $a_nat[$pos]['associated-rule-id'] = ''; - } + $a_nat = &$config['nat']['rule']; + + foreach ($a_nat as &$natent) + if ($natent['associated-rule-id'] == $id) + $natent['associated-rule-id'] = ''; } if (!is_array($config['filter']['rule'])) { @@ -147,8 +150,7 @@ if ($_POST) { if ($_GET['act'] == "del") { if ($a_filter[$_GET['id']]) { if (!empty($a_filter[$_GET['id']]['associated-rule-id'])) { - $a_nat = &$config['nat']['rule']; - delete_nat_association($a_nat, $a_filter[$_GET['id']]['associated-rule-id']); + delete_nat_association($a_filter[$_GET['id']]['associated-rule-id']); } unset($a_filter[$_GET['id']]); write_config(); @@ -161,9 +163,8 @@ if ($_GET['act'] == "del") { if (isset($_POST['del_x'])) { /* delete selected rules */ if (is_array($_POST['rule']) && count($_POST['rule'])) { - $a_nat = &$config['nat']['rule']; foreach ($_POST['rule'] as $rulei) { - delete_nat_association($a_nat, $a_filter[$rulei]['associated-rule-id']); + delete_nat_association($a_filter[$rulei]['associated-rule-id']); unset($a_filter[$rulei]); } write_config(); diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index a41bcb2..e88ac6a 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -1252,7 +1252,7 @@ include("head.inc"); <select name="l7container"> <?php if (!is_array($l7clist)) - $dnqlist = array(); + $l7clist = array(); echo "<option value=\"none\""; echo " >none</option>"; foreach ($l7clist as $l7ckey) { diff --git a/usr/local/www/system_certmanager.php b/usr/local/www/system_certmanager.php index eb3ac65..03458e9 100644 --- a/usr/local/www/system_certmanager.php +++ b/usr/local/www/system_certmanager.php @@ -528,7 +528,7 @@ function internalca_change() { <em>ex:</em> - www.pfsense.org + www.example.com </td> </tr> </table> @@ -625,7 +625,7 @@ function internalca_change() { <em>ex:</em> - www.pfsense.org + www.example.com </td> </tr> </table> |