summaryrefslogtreecommitdiffstats
path: root/usr/local/www/system_gateways_edit.php
diff options
context:
space:
mode:
authorErmal <eri@pfsense.org>2010-09-15 18:45:48 +0000
committerErmal <eri@pfsense.org>2010-09-15 18:46:46 +0000
commit3befe730ffeec38b37ed087e7c36c59d11840b83 (patch)
tree5172358fa87e61a578a57a55ee3d10186755448a /usr/local/www/system_gateways_edit.php
parentcf6a1f80e8ec88b0393f925f44ce525bef0d2850 (diff)
downloadpfsense-3befe730ffeec38b37ed087e7c36c59d11840b83.zip
pfsense-3befe730ffeec38b37ed087e7c36c59d11840b83.tar.gz
Cleanup code.
Diffstat (limited to 'usr/local/www/system_gateways_edit.php')
-rwxr-xr-xusr/local/www/system_gateways_edit.php14
1 files changed, 5 insertions, 9 deletions
diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php
index e679b90..3901d84 100755
--- a/usr/local/www/system_gateways_edit.php
+++ b/usr/local/www/system_gateways_edit.php
@@ -194,8 +194,9 @@ if ($_POST) {
if (!$input_errors) {
$reloadif = false;
$save = false;
- if ($_POST['weight'] > 1 || $_POST['latencylow'] || $_POST['latencyhigh'] || $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] ||
- $_POST['defaultgw'])
+ if (($_POST['weight'] && $_POST['weight'] > 1) ||
+ $_POST['latencylow'] || $_POST['latencyhigh'] || $_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] ||
+ $_POST['defaultgw'] || ($_POST['gateway'] && $_POST['gateway'] != "dynamic"))
$save = true;
/* if we are processing a system gateway only save the monitorip */
if (!$save && empty($_POST['interface']) && empty($_POST['gateway'])) {
@@ -216,13 +217,8 @@ if ($_POST) {
/* rebuild the array with the manual entries only */
$gateway = array();
- if ($_POST['attribute'] == "system") {
- $gateway['interface'] = $pconfig['friendlyiface'];
- $gateway['gateway'] = "dynamic";
- } else {
- $gateway['interface'] = $_POST['interface'];
- $gateway['gateway'] = $_POST['gateway'];
- }
+ $gateway['interface'] = $_POST['interface'];
+ $gateway['gateway'] = $_POST['gateway'];
$gateway['name'] = $_POST['name'];
$gateway['weight'] = $_POST['weight'];
$gateway['descr'] = $_POST['descr'];
OpenPOWER on IntegriCloud