Merge pull request #45 from namezero111111/patch-11

Wireless client config should allow blank SSID (resubmit, fixed blank li...
This commit is contained in:
Jim P 2012-02-01 12:33:43 -08:00
commit 6bc32273fe

View File

@ -561,7 +561,9 @@ if ($_POST['apply']) {
$input_errors[] = gettext("The MSS must be greater than 576 bytes.");
/* Wireless interface? */
if (isset($wancfg['wireless'])) {
$reqdfields = explode(" ", "mode ssid");
$reqdfields = "mode";
if($_POST['mode'] == 'hostap') { $reqdfields += " ssid"; }
$reqdfields = explode(" ", $reqdfields);
$reqdfieldsn = array(gettext("Mode"),gettext("SSID"));
do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors);
check_wireless_mode();
@ -649,7 +651,7 @@ if ($_POST['apply']) {
if (isset($wancfg['pppoe']['pppoe-reset-type']))
unset($wancfg['pppoe']['pppoe-reset-type']);
unset($wancfg['local']);
unset($wancfg['remote']);
unset($a_ppps[$pppid]['apn']);
unset($a_ppps[$pppid]['phone']);
@ -1481,6 +1483,7 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<center>
<div id='savebuttondiv'>
<input id="gwsave" type="Button" value="<?=gettext("Save Gateway"); ?>" onClick='hide_add_gatewaysave();'>
<input id="gwcancel" type="Button" value="<?=gettext("Cancel"); ?>" onClick='hide_add_gateway();'>
</div>
@ -2289,6 +2292,8 @@ $types6 = array("none" => gettext("None"), "staticv6" => gettext("Static IPv6"),
<td valign="top" class="vncellreq"><?=gettext("SSID"); ?></td>
<td class="vtable">
<input name="ssid" type="text" class="formfld unknown" id="ssid" size="20" value="<?=htmlspecialchars($pconfig['ssid']); ?>">
<br/>
<?=gettext("Note: Only required in Access Point mode. If left blank in Ad-hoc or Infrastructure mode, this interface will connect to any available SSID"); ?>
</td>
</tr>
<?php if (isset($wl_modes['11ng']) || isset($wl_modes['11na'])): ?>