diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 15:11:44 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 15:11:44 -0500 |
commit | c4e228f3335ec0a579e91c76394d6c5f6db21d15 (patch) | |
tree | f8544ec750ee6806a94c5d03754183ac92fcefa3 /etc/inc | |
parent | ec192fe5439c0c10e4e6bbf7a40ac4e5294fe998 (diff) | |
download | pfsense-c4e228f3335ec0a579e91c76394d6c5f6db21d15.zip pfsense-c4e228f3335ec0a579e91c76394d6c5f6db21d15.tar.gz |
Transform PORTAL_REDIRURL variable
Diffstat (limited to 'etc/inc')
-rw-r--r-- | etc/inc/captiveportal.inc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/etc/inc/captiveportal.inc b/etc/inc/captiveportal.inc index 6369d73..12701ab 100644 --- a/etc/inc/captiveportal.inc +++ b/etc/inc/captiveportal.inc @@ -259,6 +259,10 @@ function captiveportal_configure() { $htmltext = str_replace("\$CLIENT_IP\$", "#CLIENT_IP#", $htmltext); $htmltext = str_replace("\$ORIGINAL_PORTAL_IP\$", "#ORIGINAL_PORTAL_IP#", $htmltext); $htmltext = str_replace("\$PORTAL_ACTION\$", "#PORTAL_ACTION#", $htmltext); + if($config['captiveportal']['preauthurl']) { + $htmltext = str_replace("\$PORTAL_REDIRURL\$", "{$config['captiveportal']['preauthurl']}", $htmltext); + $htmltext = str_replace("#PORTAL_REDIRURL#", "{$config['captiveportal']['preauthurl']}", $htmltext); + } fwrite($fd, $htmltext); fclose($fd); } @@ -355,6 +359,10 @@ EOD; $errtext = str_replace("\$CLIENT_IP\$", "#CLIENT_IP#", $errtext); $errtext = str_replace("\$ORIGINAL_PORTAL_IP\$", "#ORIGINAL_PORTAL_IP#", $errtext); $errtext = str_replace("\$PORTAL_ACTION\$", "#PORTAL_ACTION#", $errtext); + if($config['captiveportal']['preauthurl']) { + $errtext = str_replace("\$PORTAL_REDIRURL\$", "{$config['captiveportal']['preauthurl']}", $errtext); + $errtext = str_replace("#PORTAL_REDIRURL#", "{$config['captiveportal']['preauthurl']}", $errtext); + } fwrite($fd, $errtext); fclose($fd); } |