summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-18 18:50:17 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-18 18:50:17 +0000
commit90ebf755a2d7927d03bebc6b115ed518f75ed852 (patch)
tree32e934500affcad21ecde1a7df61eb6395c28cec /usr
parentaf32f93921120820d9af380b59f08831c9e8603d (diff)
downloadpfsense-90ebf755a2d7927d03bebc6b115ed518f75ed852.zip
pfsense-90ebf755a2d7927d03bebc6b115ed518f75ed852.tar.gz
MFC 6969
Save and restore checkbox states correctly Reported-by: nngabriel on irc
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/interfaces.php12
-rwxr-xr-xusr/local/www/interfaces_wan.php12
2 files changed, 20 insertions, 4 deletions
diff --git a/usr/local/www/interfaces.php b/usr/local/www/interfaces.php
index 3cac1da..1247e08 100755
--- a/usr/local/www/interfaces.php
+++ b/usr/local/www/interfaces.php
@@ -252,8 +252,16 @@ if ($_POST) {
unset($wancfg['bandwidthtype']);
}
- $wancfg['blockpriv'] = $_POST['blockpriv'] ? true : false;
- $wancfg['blockbogons'] = $_POST['blockbogons'] ? true : false;
+ if($_POST['blockpriv'] == "yes")
+ $wancfg['blockpriv'] = true;
+ else
+ usnet($wancfg['blockpriv']);
+
+ if($_POST['blockbogons'] == "yes")
+ $wancfg['blockbogons'] = true;
+ else
+ unset($wancfg['blockbogons']);
+
$wancfg['spoofmac'] = $_POST['spoofmac'];
$wancfg['mtu'] = $_POST['mtu'];
diff --git a/usr/local/www/interfaces_wan.php b/usr/local/www/interfaces_wan.php
index 3cac1da..1247e08 100755
--- a/usr/local/www/interfaces_wan.php
+++ b/usr/local/www/interfaces_wan.php
@@ -252,8 +252,16 @@ if ($_POST) {
unset($wancfg['bandwidthtype']);
}
- $wancfg['blockpriv'] = $_POST['blockpriv'] ? true : false;
- $wancfg['blockbogons'] = $_POST['blockbogons'] ? true : false;
+ if($_POST['blockpriv'] == "yes")
+ $wancfg['blockpriv'] = true;
+ else
+ usnet($wancfg['blockpriv']);
+
+ if($_POST['blockbogons'] == "yes")
+ $wancfg['blockbogons'] = true;
+ else
+ unset($wancfg['blockbogons']);
+
$wancfg['spoofmac'] = $_POST['spoofmac'];
$wancfg['mtu'] = $_POST['mtu'];
OpenPOWER on IntegriCloud