From 11d2be5485bb3d05fdb0dd613c1f6b5305a55246 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 30 Sep 2010 15:39:43 +0000 Subject: Revert previous change to enter a hidden value when interface is disabled. GHNB broke this on revision 58611e3a1da07a33c6cf65401ad3edf278190e75 and it does not make sense. --- usr/local/www/system_gateways_edit.php | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'usr/local/www/system_gateways_edit.php') diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index 5b43173..18ea4b7 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -193,7 +193,7 @@ if ($_POST) { $save = false; if (($_POST['weight'] && $_POST['weight'] > 1) || $_POST['latencylow'] || $_POST['latencyhigh'] || $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] || - $_POST['defaultgw'] || ($_POST['gateway'] && $_POST['gateway'] != "dynamic") || $_POST['monitor']) + $_POST['defaultgw'] || ($_POST['gateway'] && $_POST['gateway'] != "dynamic")) $save = true; /* if we are processing a system gateway only save the monitorip */ if (!$save && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) { @@ -202,7 +202,8 @@ if ($_POST) { $interface = $pconfig['friendlyiface']; else $interface = $_POST['interface']; - $config['interfaces'][$interface]['monitorip'] = $_POST['monitor']; + if (!empty($interface)) + $config['interfaces'][$interface]['monitorip'] = $_POST['monitor']; } /* when dynamic gateway is not anymore a default the entry is no more needed. */ if (isset($id) && $a_gateway_item[$id]) @@ -313,13 +314,9 @@ function show_advanced_gateway() { - "; - echo "\n"; +