Skip to content

Commit

Permalink
set pref_speed to calculated value
Browse files Browse the repository at this point in the history
This may make a difference after input validation i.e. if user entered
negative numbers or emptied the speed field.
  • Loading branch information
eserte committed Jun 17, 2015
1 parent e9dd63d commit 1478909
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cgi/bbbike.cgi
Original file line number Diff line number Diff line change
Expand Up @@ -3441,6 +3441,7 @@ sub search_coord {
($velocity_kmh) = $velocity_kmh =~ m{(\d+(?:\.\d+)?)}; # input validation
$velocity_kmh += 0; # protect from things like "00"
$velocity_kmh ||= $speed_default;
$q->param("pref_speed", $velocity_kmh); # possibly correct query param
$extra_args{Velocity} = $velocity_kmh/3.6; # convert to m/s
# XXX Anzahl der Tragestellen zählen...

Expand Down

0 comments on commit 1478909

Please sign in to comment.