diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 13:13:01 -0500 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2011-01-25 13:13:01 -0500 |
commit | 38060391d57306e1f1d1dd8762a3f309ac512d98 (patch) | |
tree | 58106c43135d647bd0bcab94421c8a193ad6e454 /usr/local/captiveportal | |
parent | e0f1a8d6ec0469aebc263f17b8a0e7688e786d33 (diff) | |
download | pfsense-38060391d57306e1f1d1dd8762a3f309ac512d98.zip pfsense-38060391d57306e1f1d1dd8762a3f309ac512d98.tar.gz |
Handle PORTAL_REDIRURL variable
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-x | usr/local/captiveportal/index.php | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/local/captiveportal/index.php b/usr/local/captiveportal/index.php index 82bba8c..caaa4d2 100755 --- a/usr/local/captiveportal/index.php +++ b/usr/local/captiveportal/index.php @@ -216,6 +216,12 @@ function portal_reply_page($redirurl, $type = null, $message = null, $clientmac else $htmltext = get_include_contents("{$g['varetc_path']}/captiveportal-error.html"); + /* substitute the PORTAL_REDIRURL variable */ + if ($config['captiveportal']['preauthurl']) { + $htmltext = str_replace("\$PORTAL_REDIRURL\$", "{$config['captiveportal']['preauthurl']}", $htmltext); + $htmltext = str_replace("#PORTAL_REDIRURL#", "{$config['captiveportal']['preauthurl']}", $htmltext); + } + /* substitute other variables */ if (isset($config['captiveportal']['httpslogin'])) { $htmltext = str_replace("\$PORTAL_ACTION\$", "https://{$config['captiveportal']['httpsname']}:8001/", $htmltext); |