mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Simplify this code so it's obvious what we're really testing for.
Should be no functional change here.
This commit is contained in:
parent
1ced293c95
commit
7fa03a98aa
@ -195,11 +195,10 @@ if ($_POST) {
|
||||
}
|
||||
|
||||
if (!$input_errors) {
|
||||
if (!(($_POST['weight'] && $_POST['weight'] > 1) || $_POST['latencylow'] || $_POST['latencyhigh'] ||
|
||||
if (!($_POST['weight'] > 1 || $_POST['latencylow'] || $_POST['latencyhigh'] ||
|
||||
$_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] ||
|
||||
($_POST['defaultgw'] && !$pconfig['defaultgw']) || (!$_POST['defaultgw'] && $pconfig['defaultgw']) ||
|
||||
(empty($_POST['monitor']) || (!empty($_POST['gateway']) && $_POST['gateway'] != "dynamic")) ||
|
||||
(empty($_POST['monitor']) || (!empty($_POST['monitor']) && $_POST['monitor'] != "dynamic")))) {
|
||||
$_POST['defaultgw'] || is_ipaddr($_POST['monitor']) || is_ipaddr($_POST['gateway']))) {
|
||||
/* Delete from config if gw is dynamic and user is not saving any additional gateway data that system doesn't know */
|
||||
if (isset($id) && $a_gateway_item[$id])
|
||||
unset($a_gateway_item[$id]);
|
||||
write_config();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user