From 0c4846ff69d47651346ce582f99efa1fcf5bb2f0 Mon Sep 17 00:00:00 2001 From: Ermal Date: Thu, 16 Sep 2010 17:14:17 +0000 Subject: [PATCH] Actually this part should not have been committed at all. --- usr/local/www/system_gateways_edit.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index cec34da7b5..ed626f019f 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -91,8 +91,8 @@ if ($_POST) { unset($input_errors); /* input validation */ - $reqdfields = explode(" ", "name interface"); - $reqdfieldsn = array(gettext("Name"), gettext("Interface")); + $reqdfields = explode(" ", "name"); + $reqdfieldsn = array(gettext("Name")); do_input_validation($_POST, $reqdfields, $reqdfieldsn, &$input_errors); @@ -197,7 +197,10 @@ if ($_POST) { /* if we are processing a system gateway only save the monitorip */ if (!$save && (empty($_POST['gateway']) || $_POST['gateway'] == "dynamic")) { if (is_ipaddr($_POST['monitor'])) { - $interface = $_POST['interface']; + if (empty($_POST['interface'])) + $interface = $pconfig['friendlyiface']; + else + $interface = $_POST['interface']; $config['interfaces'][$interface]['monitorip'] = $_POST['monitor']; } /* when dynamic gateway is not anymore a default the entry is no more needed. */