summaryrefslogtreecommitdiffstats
path: root/usr/local/www/interfaces.php
diff options
context:
space:
mode:
authorErik Fonnesbeck <efonnes@gmail.com>2010-07-28 14:55:44 -0600
committerErik Fonnesbeck <efonnes@gmail.com>2010-07-28 15:23:29 -0600
commitf62c44d8ed46f830d6c581e3f3adf1e4f732f4fb (patch)
tree2e206cbb28b546760b892a809dfd87a11fa17dc9 /usr/local/www/interfaces.php
parente4603932bc3fd4b716e2034e79fcd003a52efce2 (diff)
downloadpfsense-f62c44d8ed46f830d6c581e3f3adf1e4f732f4fb.zip
pfsense-f62c44d8ed46f830d6c581e3f3adf1e4f732f4fb.tar.gz
Add a checkbox to make syncing shared wireless settings to a central area optional.
Diffstat (limited to 'usr/local/www/interfaces.php')
-rwxr-xr-xusr/local/www/interfaces.php15
1 files changed, 14 insertions, 1 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index ca8a000..8822262 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -228,6 +228,7 @@ if (isset($wancfg['wireless'])) {
$wl_regdomains_attr = &$wl_regdomain_xml_attr['regulatory-domains']['rd'];
$wl_countries = &$wl_regdomain_xml['country-codes']['country'];
$wl_countries_attr = &$wl_regdomain_xml_attr['country-codes']['country'];
+ $pconfig['persistcommonwireless'] = isset($config['wireless']['interfaces'][$wlanbaseif]);
$pconfig['standard'] = $wancfg['wireless']['standard'];
$pconfig['mode'] = $wancfg['wireless']['mode'];
$pconfig['protmode'] = $wancfg['wireless']['protmode'];
@@ -666,7 +667,7 @@ if ($_POST) {
} // end if($_POST)
function handle_wireless_post() {
- global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr;
+ global $_POST, $config, $g, $wancfg, $if, $wl_countries_attr, $wlanbaseif;
if (!is_array($wancfg['wireless']))
$wancfg['wireless'] = array();
$wancfg['wireless']['standard'] = $_POST['standard'];
@@ -702,6 +703,11 @@ function handle_wireless_post() {
$wancfg['wireless']['auth_server_addr'] = $_POST['auth_server_addr'];
$wancfg['wireless']['auth_server_port'] = $_POST['auth_server_port'];
$wancfg['wireless']['auth_server_shared_secret'] = $_POST['auth_server_shared_secret'];
+ if ($_POST['persistcommonwireless'] == "yes") {
+ if (!is_array($config['wireless']['interfaces'][$wlanbaseif]))
+ $config['wireless']['interfaces'][$wlanbaseif] = array();
+ } else if (isset($config['wireless']['interfaces'][$wlanbaseif]))
+ unset($config['wireless']['interfaces'][$wlanbaseif]);
if ($_POST['hidessid_enable'] == "yes")
$wancfg['wireless']['hidessid']['enable'] = true;
else if (isset($wancfg['wireless']['hidessid']['enable']))
@@ -1477,6 +1483,13 @@ $types = array("none" => "None", "static" => "Static", "dhcp" => "DHCP", "ppp" =
<td colspan="2" valign="top" class="listtopic">Common wireless configuration - Settings apply to all wireless networks on <?=$wlanbaseif;?>.</td>
</tr>
<tr>
+ <td valign="top" class="vncell">Persist common settings</td>
+ <td class="vtable">
+ <input name="persistcommonwireless" type="checkbox" value="yes" class="formfld" id="persistcommonwireless" <? if ($pconfig['persistcommonwireless']) echo "checked";?>>
+ <br/>Enabling this preserves the common wireless configuration through interface deletions and reassignments.
+ </td>
+ </tr>
+ <tr>
<td valign="top" class="vncellreq">Standard</td>
<td class="vtable">
<select name="standard" class="formselect" id="standard">
OpenPOWER on IntegriCloud