summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2012-05-30 20:15:05 +0000
committerErmal <eri@pfsense.org>2012-05-30 20:15:05 +0000
commita50115856994b73b11ac04e1f8d790d2741238f7 (patch)
tree77e2d6ca87ff8b96714f31daf975e031b618d8f6 /usr/local
parent03bbddae02dca4f25b2d4e087161620f94f4aeae (diff)
downloadpfsense-a50115856994b73b11ac04e1f8d790d2741238f7.zip
pfsense-a50115856994b73b11ac04e1f8d790d2741238f7.tar.gz
Rather than doig a string search do a proper matching of selected interfaces. Fixes #2378
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/services_captiveportal.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr/local/www/services_captiveportal.php b/usr/local/www/services_captiveportal.php
index 13bcc71..eb657b5 100755
--- a/usr/local/www/services_captiveportal.php
+++ b/usr/local/www/services_captiveportal.php
@@ -331,10 +331,11 @@ function enable_change(enable_change) {
<select name="cinterface[]" multiple="true" size="<?php echo count($config['interfaces']); ?>" class="formselect" id="cinterface">
<?php
$interfaces = get_configured_interface_with_descr();
+ $cselected = explode(",", $pconfig['cinterface']);
foreach ($interfaces as $iface => $ifacename): ?>
- <option value="<?=$iface;?>" <?php if (stristr($pconfig['cinterface'], $iface)) echo "selected"; ?>>
- <?=htmlspecialchars($ifacename);?>
- </option>
+ <option value="<?=$iface;?>" <?php if (in_array($iface, $cselected)) echo "selected"; ?>>
+ <?=htmlspecialchars($ifacename);?>
+ </option>
<?php endforeach; ?>
</select> <br>
<span class="vexpl"><?=gettext("Select the interface(s) to enable for captive portal."); ?></span></td>
OpenPOWER on IntegriCloud