summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-07-04 19:52:23 +0000
committerBill Marquette <billm@pfsense.org>2005-07-04 19:52:23 +0000
commit63637de9323161beccf84ed60f69696ce11a5c24 (patch)
tree5faec68b748e1aa2651f3e50ab26c9a3bd705391 /usr
parent13c25b6ea2957c11a7619a604941a80ebe930267 (diff)
downloadpfsense-63637de9323161beccf84ed60f69696ce11a5c24.zip
pfsense-63637de9323161beccf84ed60f69696ce11a5c24.tar.gz
Code cleanup
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/diag_backup.php2
-rwxr-xr-xusr/local/www/diag_logs_vpn.php2
-rwxr-xr-xusr/local/www/guiconfig.inc6
-rwxr-xr-xusr/local/www/index.php2
-rwxr-xr-xusr/local/www/pkg_edit.php10
-rwxr-xr-xusr/local/www/status_interfaces.php2
-rwxr-xr-xusr/local/www/status_wireless.php2
-rwxr-xr-xusr/local/www/wizard.php13
8 files changed, 21 insertions, 18 deletions
diff --git a/usr/local/www/diag_backup.php b/usr/local/www/diag_backup.php
index d1ad327..f63cc9d 100755
--- a/usr/local/www/diag_backup.php
+++ b/usr/local/www/diag_backup.php
@@ -258,4 +258,4 @@ include("head.inc");
</form>
<?php include("fend.inc"); ?>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/usr/local/www/diag_logs_vpn.php b/usr/local/www/diag_logs_vpn.php
index 21d806c..630f540 100755
--- a/usr/local/www/diag_logs_vpn.php
+++ b/usr/local/www/diag_logs_vpn.php
@@ -45,7 +45,7 @@ if ($_POST['clear']) {
}
function dump_clog_vpn($logfile, $tail) {
- global $g, $config;
+ global $config;
$sor = isset($config['syslog']['reverse']) ? "-r" : "";
diff --git a/usr/local/www/guiconfig.inc b/usr/local/www/guiconfig.inc
index de3659d..431d967 100755
--- a/usr/local/www/guiconfig.inc
+++ b/usr/local/www/guiconfig.inc
@@ -275,7 +275,7 @@ function pprint_port($port) {
/* sort by interface only, retain the original order of rules that apply to
the same interface */
function filter_rules_sort() {
- global $g, $config;
+ global $config;
/* mark each rule with the sequence number (to retain the order while sorting) */
for ($i = 0; isset($config['filter']['rule'][$i]); $i++)
@@ -296,7 +296,7 @@ function filter_rules_sort() {
}
function nat_rules_sort() {
- global $g, $config;
+ global $config;
function natcmp($a, $b) {
if ($a['external-address'] == $b['external-address']) {
@@ -571,7 +571,7 @@ function pconfig_to_address(&$adr, $padr, $pmask, $pnot=false, $pbeginport=0, $p
if ($pnot)
$adr['not'] = true;
else
- unset($addr['not']);
+ unset($adr['not']);
if (($pbeginport != 0) && ($pbeginport != "any")) {
if ($pbeginport != $pendport)
diff --git a/usr/local/www/index.php b/usr/local/www/index.php
index 03093f6..2b2acf1 100755
--- a/usr/local/www/index.php
+++ b/usr/local/www/index.php
@@ -131,7 +131,7 @@ return $cpuUsage;
}
function get_pfstate() {
- global $config, $g;
+ global $config;
if (isset($config['system']['maximumstates']) and $config['system']['maximumstates'] > 0)
$maxstates="/{$config['system']['maximumstates']}";
else
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 7b71bcf..8c350df 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -611,12 +611,14 @@ function fixup_string($string) {
global $config;
// fixup #1: $myurl -> http[s]://ip_address:port/
$https = "";
- $port = "";
- $urlport = "";
$port = $config['system']['webguiport'];
- if($port <> "443" and $port <> "80") $urlport = ":" . $port;
+ if($port <> "443" and $port <> "80")
+ $urlport = ":" . $port;
+ else
+ $urlport = "";
+
if($config['system']['webguiproto'] == "https") $https = "s";
- $myurl = "http" . $https . "://" . getenv("HTTP_HOST") . $urlportport;
+ $myurl = "http" . $https . "://" . getenv("HTTP_HOST") . $urlport;
$newstring = str_replace("\$myurl", $myurl, $string);
$string = $newstring;
// fixup #2: $wanip
diff --git a/usr/local/www/status_interfaces.php b/usr/local/www/status_interfaces.php
index 197eefe..f5a1e86 100755
--- a/usr/local/www/status_interfaces.php
+++ b/usr/local/www/status_interfaces.php
@@ -56,7 +56,7 @@ if ($_POST) {
function get_interface_info($ifdescr) {
- global $config, $g;
+ global $config;
$ifinfo = array();
diff --git a/usr/local/www/status_wireless.php b/usr/local/www/status_wireless.php
index aa47ab6..82ff93c 100755
--- a/usr/local/www/status_wireless.php
+++ b/usr/local/www/status_wireless.php
@@ -34,7 +34,7 @@ require("guiconfig.inc");
function get_wireless_info($ifdescr) {
- global $config, $g;
+ global $config;
$ifinfo = array();
$ifinfo['if'] = $config['interfaces'][$ifdescr]['if'];
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 02afa97..16991a1 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -435,18 +435,19 @@ function fixup_string($string) {
$newstring = $string;
// fixup #1: $myurl -> http[s]://ip_address:port/
$https = "";
- $port = "";
- $urlport = "";
$port = $config['system']['webguiport'];
- if($port <> "443" and $port <> "80") $urlport = ":" . $port;
- if($config['system']['webguiproto'] == "https") $https = "s";
- $myurl = "http" . $https . "://" . $config['interfaces']['lan']['ipaddr'];
+ if($port <> "443" and $port <> "80")
+ $urlport = ":" . $port;
+ else
+ $urlport = "";
+ if($config['system']['webguiproto'] == "https")
+ $https = "s";
+ $myurl = "http" . $https . "://" . $config['interfaces']['lan']['ipaddr'] . $urlport;
$newstring = str_replace("\$myurl", $myurl, $newstring);
// fixup #2: $wanip
$curwanip = get_current_wan_address();
$newstring = str_replace("\$wanip", $curwanip, $newstring);
// fixup #3: $lanip
- $lancfg = $config['interfaces']['lan'];
$lanip = $config['interfaces']['lan']['ipaddr'];
$newstring = str_replace("\$lanip", $lanip, $newstring);
// fixup #4: fix'r'up here.
OpenPOWER on IntegriCloud