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/wizard.php | |
parent | 13c25b6ea2957c11a7619a604941a80ebe930267 (diff) | |
download | pfsense-63637de9323161beccf84ed60f69696ce11a5c24.zip pfsense-63637de9323161beccf84ed60f69696ce11a5c24.tar.gz |
Code cleanup
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-x | usr/local/www/wizard.php | 13 |
1 files changed, 7 insertions, 6 deletions
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. |