summaryrefslogtreecommitdiffstats
path: root/usr/local/www/services_captiveportal.php
diff options
context:
space:
mode:
authorErmal Luçi <eri@pfsense.org>2008-06-21 17:13:18 +0000
committerErmal Luçi <eri@pfsense.org>2008-06-21 17:13:18 +0000
commitfbb45bb034aad683b2bd207a497d0cfc0b1b5a1e (patch)
treec3ca0e3af16571da1d6f07059b72465bce5f97d3 /usr/local/www/services_captiveportal.php
parentb73911250669f091119a237ebad5078fdb130ff2 (diff)
downloadpfsense-fbb45bb034aad683b2bd207a497d0cfc0b1b5a1e.zip
pfsense-fbb45bb034aad683b2bd207a497d0cfc0b1b5a1e.tar.gz
Continue interface improvements
Diffstat (limited to 'usr/local/www/services_captiveportal.php')
-rwxr-xr-xusr/local/www/services_captiveportal.php16
1 files changed, 5 insertions, 11 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 7cc6c49..40a5cc6 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -92,9 +92,10 @@ if ($_POST) {
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
/* make sure no interfaces are bridged */
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- $coptif = &$config['interfaces']['opt' . $i];
- if (isset($coptif['enable']) && $coptif['bridge'] == $pconfig['cinterface']) {
+ $iflist = get_configured_interface_list(true);
+ foreach ($iflist as $if) {
+ $coptif = &$config['interfaces'][$if];
+ if ($coptif['bridge'] == $pconfig['cinterface']) {
$input_errors[] = "The captive portal cannot be used when one or more interfaces are bridged.";
break;
}
@@ -279,14 +280,7 @@ function enable_change(enable_change) {
<td width="78%" class="vtable">
<select name="cinterface" class="formselect" id="cinterface">
<?php
- if($config['interfaces']['lan'])
- $interfaces = array('lan' => 'LAN');
- else
- $interfaces = array();
- for ($i = 1; isset($config['interfaces']['opt' . $i]); $i++) {
- if (isset($config['interfaces']['opt' . $i]['enable']))
- $interfaces['opt' . $i] = $config['interfaces']['opt' . $i]['descr'];
- }
+ $interfaces = get_configured_interface_with_descr();
foreach ($interfaces as $iface => $ifacename): ?>
<option value="<?=$iface;?>" <?php if ($iface == $pconfig['cinterface']) echo "selected"; ?>>
<?=htmlspecialchars($ifacename);?>
OpenPOWER on IntegriCloud