summaryrefslogtreecommitdiffstats
path: root/usr/local/www/wizard.php
diff options
context:
space:
mode:
Diffstat (limited to 'usr/local/www/wizard.php')
-rwxr-xr-xusr/local/www/wizard.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 79febf8..3b375b9 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -331,6 +331,7 @@ if($pkg['step'][$stepid]['javascriptafterformdisplay'] <> "") {
*/
function fixup_string($string) {
+ global $config;
// fixup #1: $myurl -> http[s]://ip_address:port/
$https = "";
$port = "";
@@ -340,7 +341,17 @@ function fixup_string($string) {
if($config['system']['webguiproto'] == "https") $https = "s";
$myurl = "http" . $https . "://" . getenv("HTTP_HOST") . $urlportport;
$newstring = str_replace("\$myurl", $myurl, $string);
- // fixup #2: fix'er'up here.
+ $string = $newstring;
+ // fixup #2: $wanip
+ $curwanip = get_current_wan_address();
+ $newstring = str_replace("\$wanip", $curwanip, $string);
+ $string = $newstring;
+ // fixup #3: $lanip
+ $lancfg = $config['interfaces']['lan'];
+ $lanip = $lancfg['ipaddr'];
+ $newstring = str_replace("\$lanip", $lanip, $string);
+ $string = $newstring;
+ // fixup #4: fix'r'up here.
return $newstring;
}
OpenPOWER on IntegriCloud