From 33eaec8811cd5a36e217de79c60beb13f0334c04 Mon Sep 17 00:00:00 2001 From: Scott Ullrich Date: Tue, 18 Oct 2005 01:55:26 +0000 Subject: Save and restore checkboxes correctly Reported-by: HOBA --- usr/local/www/vpn_pppoe.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'usr/local/www/vpn_pppoe.php') 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; -- cgit v1.1