diff options
author | Ermal <eri@pfsense.org> | 2012-05-30 20:14:08 +0000 |
---|---|---|
committer | Ermal <eri@pfsense.org> | 2012-05-30 20:14:08 +0000 |
commit | 1710305617db80cde51a961077c3d18959c238d3 (patch) | |
tree | 1a773eaccb380fd7a1193cdfe40be102423f0986 /usr/local | |
parent | 4dc04853f4588043bd39a6e304cbb33388937744 (diff) | |
download | pfsense-1710305617db80cde51a961077c3d18959c238d3.zip pfsense-1710305617db80cde51a961077c3d18959c238d3.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 785c1ba..472fccd 100755 --- a/usr/local/www/services_captiveportal.php +++ b/usr/local/www/services_captiveportal.php @@ -445,10 +445,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> |