From 38060391d57306e1f1d1dd8762a3f309ac512d98 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 25 Jan 2011 13:13:01 -0500 Subject: Handle PORTAL_REDIRURL variable --- usr/local/captiveportal/index.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'usr/local/captiveportal') 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); -- cgit v1.1