summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal.php
diff options
context:
space:
mode:
authorDarren Embry <dse@webonastick.com>2012-05-03 12:34:12 -0400
committerDarren Embry <dse@webonastick.com>2012-05-03 12:34:12 -0400
commit470d24a39d8a4cdaf7a85aeb71d7a7d802d76879 (patch)
treeae9f13c5b357e28b7de1cb89e6fcb8edc38d2c7b /usr/local/www/services_captiveportal.php
parent6b2d4b5a05c347f2c56a815c4ae7f4053b082597 (diff)
downloadpfsense-470d24a39d8a4cdaf7a85aeb71d7a7d802d76879.zip
pfsense-470d24a39d8a4cdaf7a85aeb71d7a7d802d76879.tar.gz
implement #2407: create config option for captive portal listening port
Diffstat (limited to 'usr/local/www/services_captiveportal.php')
-rwxr-xr-xusr/local/www/services_captiveportal.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 6ee3da4..9a128a7 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -896,10 +896,13 @@ function enable_change(enable_change) {
<?=$mandfldhtml;?><input type="file" name="htmlfile" class="formfld file" id="htmlfile"><br>
<?php
list($host) = explode(":", $_SERVER['HTTP_HOST']);
- if($pconfig['zoneid']) {
- $href = "https://{$host}:{$pconfig['zoneid']}";
+ $zoneid = $pconfig['zoneid'] ? $pconfig['zoneid'] : 8000;
+ if (isset($pconfig['httpslogin'])) {
+ $port = $pconfig['listenporthttps'] ? $pconfig['listenporthttps'] : ($zoneid + 1);
+ $href = "https://{$host}:{$port}";
} else {
- $href = "http://{$host}:8000";
+ $port = $pconfig['listenporthttp'] ? $pconfig['listenporthttp'] : $zoneid;
+ $href = "http://{$host}:{$port}";
}
?>
<?php if ($pconfig['page']['htmltext']): ?>
OpenPOWER on IntegriCloud