Revision 7fa03a98
Added by Marcus Brown almost 15 years ago
usr/local/www/system_gateways_edit.php | ||
---|---|---|
195 | 195 |
} |
196 | 196 |
|
197 | 197 |
if (!$input_errors) { |
198 |
if (!(($_POST['weight'] && $_POST['weight'] > 1) || $_POST['latencylow'] || $_POST['latencyhigh'] ||
|
|
198 |
if (!($_POST['weight'] > 1 || $_POST['latencylow'] || $_POST['latencyhigh'] ||
|
|
199 | 199 |
$_POST['losslow'] || $_POST['losshigh'] || $_POST['down'] || |
200 |
($_POST['defaultgw'] && !$pconfig['defaultgw']) || (!$_POST['defaultgw'] && $pconfig['defaultgw']) || |
|
201 |
(empty($_POST['monitor']) || (!empty($_POST['gateway']) && $_POST['gateway'] != "dynamic")) || |
|
202 |
(empty($_POST['monitor']) || (!empty($_POST['monitor']) && $_POST['monitor'] != "dynamic")))) { |
|
200 |
$_POST['defaultgw'] || is_ipaddr($_POST['monitor']) || is_ipaddr($_POST['gateway']))) { |
|
201 |
/* Delete from config if gw is dynamic and user is not saving any additional gateway data that system doesn't know */ |
|
203 | 202 |
if (isset($id) && $a_gateway_item[$id]) |
204 | 203 |
unset($a_gateway_item[$id]); |
205 | 204 |
write_config(); |
Also available in: Unified diff
Simplify this code so it's obvious what we're really testing for.
Should be no functional change here.