diff options
author | Ermal <eri@pfsense.org> | 2012-05-30 20:15:05 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-05-30 20:15:05 +0000 |
commit | a50115856994b73b11ac04e1f8d790d2741238f7 (patch) | |
tree | 77e2d6ca87ff8b96714f31daf975e031b618d8f6 /usr/local | |
parent | 03bbddae02dca4f25b2d4e087161620f94f4aeae (diff) | |
download | pfsense-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-x | usr/local/www/services_captiveportal.php | 7 |
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> |