Forbid zero or negative ascent/descent rates

pull/81/head
Daniel Richman 2011-09-02 12:07:25 +01:00
rodzic 5faf475ac0
commit 71f2e3fd6d
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -81,6 +81,12 @@ function verifyModel( $pred_model, $software_available ) {
$return_array['msg'] = "The latitude or longitude deltas
were outside the allowed range on this server";
}
} else if ( $idx == "asc" || $idx == "des" ) {
if ( $value <= 0 ) {
$return_array['valid'] = false;
$return_array['msg'] = "The ascent and descent rates cannot
be zero or negative";
}
} else if ( !is_numeric( $value ) ) {
$return_array['valid'] = false;
$return_array['msg'] = "A value that should have been numeric