summaryrefslogtreecommitdiffstats
path: root/usr/local/captiveportal
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2011-01-25 13:13:01 -0500
committerScott Ullrich <sullrich@pfsense.org>2011-01-25 13:13:01 -0500
commit38060391d57306e1f1d1dd8762a3f309ac512d98 (patch)
tree58106c43135d647bd0bcab94421c8a193ad6e454 /usr/local/captiveportal
parente0f1a8d6ec0469aebc263f17b8a0e7688e786d33 (diff)
downloadpfsense-38060391d57306e1f1d1dd8762a3f309ac512d98.zip
pfsense-38060391d57306e1f1d1dd8762a3f309ac512d98.tar.gz
Handle PORTAL_REDIRURL variable
Diffstat (limited to 'usr/local/captiveportal')
-rwxr-xr-xusr/local/captiveportal/index.php6
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);
OpenPOWER on IntegriCloud