diff options
author | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-14 12:41:34 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@fury.ukcod.org.uk> | 2011-02-14 12:41:34 +0000 |
commit | 919d334cf8d9e1880bce21a7df28c0fd5abcdb47 (patch) | |
tree | 2a2c029ed2436627c2896b2a838145c1bcbe9119 | |
parent | 1421ac837449d153fbd517caa550d26052156a21 (diff) |
DB used to return metres, now returns km.
-rwxr-xr-x | web/ajax.cgi | 6 | ||||
-rwxr-xr-x | web/index.cgi | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/web/ajax.cgi b/web/ajax.cgi index 69c389765..f13529852 100755 --- a/web/ajax.cgi +++ b/web/ajax.cgi @@ -59,8 +59,8 @@ sub main { $list = ''; foreach (@$around_map) { - my $dist = int($_->{distance}/100+.5)/10; - $link = Cobrand::url($cobrand, NewURL($q, -retain => 1, + my $dist = int($_->{distance}*10+.5)/10; + $link = Cobrand::url($cobrand, NewURL($q, -retain => 1, -url => '/report/' . $_->{id}, pc => undef, x => undef, @@ -81,7 +81,7 @@ sub main { #$list = ''; #foreach (@$fixed) { # $list .= '<li><a href="/report/' . $_->{id} . '">'; - # $list .= $_->{title} . ' <small>(' . int($_->{distance}/100+.5)/10 . 'km)</small>'; + # $list .= $_->{title} . ' <small>(' . int($_->{distance}*10+.5)/10 . 'km)</small>'; # $list .= '</a></li>'; #} #my $f_list = $list; diff --git a/web/index.cgi b/web/index.cgi index 1a60b05a7..cd9a7574c 100755 --- a/web/index.cgi +++ b/web/index.cgi @@ -903,7 +903,7 @@ sub display_location { foreach (@$around_map) { my $report_url = Cobrand::url($cobrand, NewURL($q, -retain => 1, -url => '/report/' . $_->{id}, pc => undef, x => undef, 'y' => undef), $q); $around_list .= '<li><a href="' . $report_url . '">'; - my $dist = int($_->{distance}/100+0.5); + my $dist = int($_->{distance}*10+0.5); $dist = $dist / 10; $around_list .= ent($_->{title}) . '</a> <small>('; $around_list .= Page::prettify_epoch($q, $_->{time}, 1) . ', '; |