summaryrefslogtreecommitdiffstats
path: root/usr/local
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-10-18 01:55:26 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-10-18 01:55:26 +0000
commit33eaec8811cd5a36e217de79c60beb13f0334c04 (patch)
tree35d578fd738ea4949335394aede759f479edaa10 /usr/local
parent6f5b2c3e099197033d409201ecd7c554be08ec83 (diff)
downloadpfsense-33eaec8811cd5a36e217de79c60beb13f0334c04.zip
pfsense-33eaec8811cd5a36e217de79c60beb13f0334c04.tar.gz
Save and restore checkboxes correctly
Reported-by: HOBA
Diffstat (limited to 'usr/local')
-rwxr-xr-xusr/local/www/vpn_pppoe.php13
-rwxr-xr-xusr/local/www/vpn_pptp.php18
2 files changed, 26 insertions, 5 deletions
diff --git a/usr/local/www/vpn_pppoe.php b/usr/local/www/vpn_pppoe.php
index 2efb4cb..1b09483 100755
--- a/usr/local/www/vpn_pppoe.php
+++ b/usr/local/www/vpn_pppoe.php
@@ -95,11 +95,20 @@ if ($_POST) {
$pppoecfg['mode'] = $_POST['mode'];
$pppoecfg['interface'] = $_POST['interface'];
$pppoecfg['n_pppoe_units'] = $_POST['n_pppoe_units'];
- $pppoecfg['radius']['enable'] = $_POST['radiusenable'] ? true : false;
- $pppoecfg['radius']['accounting'] = $_POST['radacct_enable'] ? true : false;
+
$pppoecfg['radius']['server'] = $_POST['radiusserver'];
$pppoecfg['radius']['secret'] = $_POST['radiussecret'];
+ if($_POST['radiusenable'] == "yes")
+ $pppoecfg['radius']['enable'] = true;
+ else
+ unset($pppoecfg['radius']['enable']);
+
+ if($_POST['radacct_enable'] == "yes")
+ $pppoecfg['radius']['accounting'] = true;
+ else
+ unset($pppoecfg['radius']['accounting']);
+
write_config();
$retval = 0;
diff --git a/usr/local/www/vpn_pptp.php b/usr/local/www/vpn_pptp.php
index a6b3d54..87c4225 100755
--- a/usr/local/www/vpn_pptp.php
+++ b/usr/local/www/vpn_pptp.php
@@ -105,12 +105,24 @@ if ($_POST) {
$pptpcfg['localip'] = $_POST['localip'];
$pptpcfg['mode'] = $_POST['mode'];
$pptpcfg['wins'] = $_POST['wins'];
- $pptpcfg['req128'] = $_POST['req128'] ? true : false;
- $pptpcfg['radius']['enable'] = $_POST['radiusenable'] ? true : false;
- $pptpcfg['radius']['accounting'] = $_POST['radacct_enable'] ? true : false;
$pptpcfg['radius']['server'] = $_POST['radiusserver'];
$pptpcfg['radius']['secret'] = $_POST['radiussecret'];
+
+ if($_POST['req128'] == "yes")
+ $pptpcfg['req128'] = true;
+ else
+ unset($pptpcfg['req128']);
+
+ if($_POST['radiusenable'] == "yes")
+ $pptpcfg['radius']['enable'] = true;
+ else
+ unset($pptpcfg['radius']['enable']);
+ if($_POST['radacct_enable'] == "yes")
+ $pptpcfg['radius']['accounting'] = true;
+ else
+ unset($pptpcfg['radius']['accounting']);
+
write_config();
$retval = 0;
OpenPOWER on IntegriCloud