aboutsummaryrefslogtreecommitdiffstats
path: root/web/rss.cgi
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-02-10 13:44:49 +0000
committerEdmund von der Burg <evdb@mysociety.org>2011-02-10 13:44:49 +0000
commit89d70df4e7c808041e5e2a6e89ae57382541a7fa (patch)
treef127c8be1a8a0afbed5b544957fb080a3ea04886 /web/rss.cgi
parent5699fe2d0c57811fce87740b6555e9892181a882 (diff)
Bug fixes found by running test suite
Diffstat (limited to 'web/rss.cgi')
-rwxr-xr-xweb/rss.cgi5
1 files changed, 3 insertions, 2 deletions
diff --git a/web/rss.cgi b/web/rss.cgi
index 9a9b4ce18..cb5221537 100755
--- a/web/rss.cgi
+++ b/web/rss.cgi
@@ -88,11 +88,11 @@ sub rss_local_problems {
# 5000/31 as initial scale factor for these RSS feeds, now variable so redirect.
$e = int( ($x * 5000/31) + 0.5 );
$n = int( ($y * 5000/31) + 0.5 );
- ($lat, $lon) = Utils::convert_en_to_latlon($e, $n);
+ ($lat, $lon) = Utils::convert_en_to_latlon_truncated($e, $n);
print $q->redirect(-location => "$base/rss/l/$lat,$lon$d_str$state_qs");
return '';
} elsif ($e && $n) {
- ($lat, $lon) = Utils::convert_en_to_latlon($e, $n);
+ ($lat, $lon) = Utils::convert_en_to_latlon_truncated($e, $n);
print $q->redirect(-location => "$base/rss/l/$lat,$lon$d_str$state_qs");
return '';
} elsif ($pc) {
@@ -103,6 +103,7 @@ sub rss_local_problems {
$error = shift;
};
unless ($error) {
+ ( $lat, $lon ) = map { Utils::truncate_coordinate($_) } ( $lat, $lon );
print $q->redirect(-location => "$base/rss/l/$lat,$lon$d_str$state_qs");
}
return '';