diff options
Diffstat (limited to 'usr/local/www/vpn_pptp.php')
-rwxr-xr-x | usr/local/www/vpn_pptp.php | 18 |
1 files changed, 15 insertions, 3 deletions
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; |