diff options
author | Bill Marquette <billm@pfsense.org> | 2005-07-04 19:52:23 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-07-04 19:52:23 +0000 |
commit | 63637de9323161beccf84ed60f69696ce11a5c24 (patch) | |
tree | 5faec68b748e1aa2651f3e50ab26c9a3bd705391 /usr/local/www/pkg_edit.php | |
parent | 13c25b6ea2957c11a7619a604941a80ebe930267 (diff) | |
download | pfsense-63637de9323161beccf84ed60f69696ce11a5c24.zip pfsense-63637de9323161beccf84ed60f69696ce11a5c24.tar.gz |
Code cleanup
Diffstat (limited to 'usr/local/www/pkg_edit.php')
-rwxr-xr-x | usr/local/www/pkg_edit.php | 10 |
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 |