diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2005-10-18 18:50:17 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2005-10-18 18:50:17 +0000 |
commit | 90ebf755a2d7927d03bebc6b115ed518f75ed852 (patch) | |
tree | 32e934500affcad21ecde1a7df61eb6395c28cec /usr | |
parent | af32f93921120820d9af380b59f08831c9e8603d (diff) | |
download | pfsense-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-x | usr/local/www/interfaces.php | 12 | ||||
-rwxr-xr-x | usr/local/www/interfaces_wan.php | 12 |
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']; |