mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Save and restore checkboxes correctly
Reported-by: HOBA
This commit is contained in:
parent
6f5b2c3e09
commit
33eaec8811
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user