diff options
author | gnhb <gnoahb@gmail.com> | 2010-04-12 22:43:33 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-04-12 22:43:33 +0700 |
commit | eca1f1ead81747afc1226610b4d2fe30e718706a (patch) | |
tree | 50c9b92565a624d5f7cb85bdc1ccd2d76057c577 /usr | |
parent | d32a40c1c6eb3d9de1f3ed2d958298aedfae16ea (diff) | |
parent | 00c827829ba1100be39dbd5508718903a07f11c8 (diff) | |
download | pfsense-eca1f1ead81747afc1226610b4d2fe30e718706a.zip pfsense-eca1f1ead81747afc1226610b4d2fe30e718706a.tar.gz |
Merge branch 'master' of rcs.pfsense.org:pfsense/mainline
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> |