summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-06-22 15:12:43 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-06-22 15:12:43 +0000
commit78818d7a4b02ebc5a8402111ef44abbad92f0875 (patch)
tree4442f6315c86b35abec54eacf9553414405c901b /usr/local/www/wizard.php
parent3a79fa1e46329d64073ceafbf7685dd0e6c809bc (diff)
downloadpfsense-78818d7a4b02ebc5a8402111ef44abbad92f0875.zip
pfsense-78818d7a4b02ebc5a8402111ef44abbad92f0875.tar.gz
Correctly popultae $myurl and friends
Fixes Ticket #179
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 9e7e778..e12a132 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -437,6 +437,7 @@ if($pkg['step'][$stepid]['javascriptafterformdisplay'] <> "") {
function fixup_string($string) {
global $config, $myurl;
+ $newstring = $string;
// fixup #1: $myurl -> http[s]://ip_address:port/
$https = "";
$port = "";
@@ -444,19 +445,15 @@ function fixup_string($string) {
$port = $config['system']['webguiport'];
if($port <> "443" and $port <> "80") $urlport = ":" . $port;
if($config['system']['webguiproto'] == "https") $https = "s";
- //$myurl = "http" . $https . "://" . getenv("HTTP_HOST") . $urlportport;
- $myurl = "http" . $https . "://" . $config['interfaces']['lan']['ip'];
- $newstring = str_replace("\$myurl", $myurl, $string);
- $string = $newstring;
+ $myurl = "http" . $https . "://" . $config['interfaces']['lan']['ipaddr'];
+ $newstring = str_replace("\$myurl", $myurl, $newstring);
// fixup #2: $wanip
$curwanip = get_current_wan_address();
- $newstring = str_replace("\$wanip", $curwanip, $string);
- $string = $newstring;
+ $newstring = str_replace("\$wanip", $curwanip, $newstring);
// fixup #3: $lanip
$lancfg = $config['interfaces']['lan'];
- $lanip = $lancfg['ipaddr'];
- $newstring = str_replace("\$lanip", $lanip, $string);
- $string = $newstring;
+ $lanip = $config['interfaces']['lan']['ipaddr'];
+ $newstring = str_replace("\$lanip", $lanip, $newstring);
// fixup #4: fix'r'up here.
return $newstring;
}
OpenPOWER on IntegriCloud