diff options
author | Bill Marquette <billm@pfsense.org> | 2005-05-15 22:38:44 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-05-15 22:38:44 +0000 |
commit | 0884ea0ab284e787c370d2880611c106e3626d28 (patch) | |
tree | 51fdf6c568cf7839054c57a7ef33f6a3efb4ccf2 | |
parent | 23a8ad04474bfdba690024314ccf2097b8ee754f (diff) | |
download | pfsense-0884ea0ab284e787c370d2880611c106e3626d28.zip pfsense-0884ea0ab284e787c370d2880611c106e3626d28.tar.gz |
Remove more duplicate code
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 9 | ||||
-rwxr-xr-x | usr/local/www/firewall_shaper_edit.php | 9 | ||||
-rwxr-xr-x | usr/local/www/guiconfig.inc | 9 | ||||
-rwxr-xr-x | usr/local/www/vpn_ipsec_edit.php | 9 |
4 files changed, 9 insertions, 27 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 02e9d05..c916519 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -54,15 +54,6 @@ if (isset($_GET['dup'])) { $after = $_GET['dup']; } -function is_specialnet($net) { - global $specialsrcdst; - - if (in_array($net, $specialsrcdst) || strstr($net, "opt")) - return true; - else - return false; -} - if (isset($id) && $a_filter[$id]) { $pconfig['interface'] = $a_filter[$id]['interface']; diff --git a/usr/local/www/firewall_shaper_edit.php b/usr/local/www/firewall_shaper_edit.php index 059a6a9..eae126d 100755 --- a/usr/local/www/firewall_shaper_edit.php +++ b/usr/local/www/firewall_shaper_edit.php @@ -52,15 +52,6 @@ if (isset($_GET['dup'])) { $after = $_GET['dup']; } -function is_specialnet($net) { - global $specialsrcdst; - - if (in_array($net, $specialsrcdst) || strstr($net, "opt")) - return true; - else - return false; -} - if (isset($id) && $a_shaper[$id]) { $pconfig['interface'] = $a_shaper[$id]['interface']; diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc index 78b0f7c..119a172 100755 --- a/usr/local/www/guiconfig.inc +++ b/usr/local/www/guiconfig.inc @@ -675,4 +675,13 @@ function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $p } } +function is_specialnet($net) { + global $specialsrcdst; + + if (in_array($net, $specialsrcdst) || strstr($net, "opt")) + return true; + else + return false; +} + ?> diff --git a/usr/local/www/vpn_ipsec_edit.php b/usr/local/www/vpn_ipsec_edit.php index b290bb9..33659eb 100755 --- a/usr/local/www/vpn_ipsec_edit.php +++ b/usr/local/www/vpn_ipsec_edit.php @@ -45,15 +45,6 @@ $id = $_GET['id']; if (isset($_POST['id'])) $id = $_POST['id']; -function is_specialnet($net) { - global $specialsrcdst; - - if (in_array($net, $specialsrcdst)) - return true; - else - return false; -} - if (isset($id) && $a_ipsec[$id]) { $pconfig['disabled'] = isset($a_ipsec[$id]['disabled']); $pconfig['auto'] = isset($a_ipsec[$id]['auto']); |