summaryrefslogtreecommitdiffstats
path: root/usr/local/www/pkg_edit.php
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/local/www/pkg_edit.php
parent13c25b6ea2957c11a7619a604941a80ebe930267 (diff)
downloadpfsense-63637de9323161beccf84ed60f69696ce11a5c24.zip
pfsense-63637de9323161beccf84ed60f69696ce11a5c24.tar.gz
Code cleanup
Diffstat (limited to 'usr/local/www/pkg_edit.php')
-rwxr-xr-xusr/local/www/pkg_edit.php10
1 files changed, 6 insertions, 4 deletions
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
OpenPOWER on IntegriCloud