From 0c88fc1ee2ffb3589ac41b514e2183306564b6ab Mon Sep 17 00:00:00 2001 From: jim-p Date: Tue, 1 Jun 2010 13:06:56 -0400 Subject: Fix disabled setting for OpenVPN CSC entries, which was causing them to disapper. (Disable was handled inconsistently, as with normal OpenVPN entries.) Fixes #633. --- usr/local/www/vpn_openvpn_csc.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'usr/local') diff --git a/usr/local/www/vpn_openvpn_csc.php b/usr/local/www/vpn_openvpn_csc.php index b70404f..884a3e4 100644 --- a/usr/local/www/vpn_openvpn_csc.php +++ b/usr/local/www/vpn_openvpn_csc.php @@ -69,7 +69,7 @@ if($_GET['act']=="edit"){ if (isset($id) && $a_csc[$id]) { $pconfig['custom_options'] = $a_csc[$id]['custom_options']; - $pconfig['disable'] = $a_csc[$id]['disable']; + $pconfig['disable'] = isset($a_csc[$id]['disable']); $pconfig['common_name'] = $a_csc[$id]['common_name']; $pconfig['block'] = $a_csc[$id]['block']; $pconfig['description'] = $a_csc[$id]['description']; @@ -168,7 +168,8 @@ if ($_POST) { $csc = array(); $csc['custom_options'] = $pconfig['custom_options']; - $csc['disable'] = $pconfig['disable']; + if ($_POST['disable'] == "yes") + $csc['disable'] = true; $csc['common_name'] = $pconfig['common_name']; $csc['block'] = $pconfig['block']; $csc['description'] = $pconfig['description']; @@ -314,7 +315,7 @@ function netbios_change() { -- cgit v1.1
- + /> @@ -676,7 +677,7 @@ function netbios_change() { $i = 0; foreach($a_csc as $csc): $disabled = "NO"; - if ($csc['disable']) + if (isset($csc['disable'])) $disabled = "YES"; ?>