[NUUG fiksgatami] [patch] Bug/crash for location based RSS feed
Petter Reinholdtsen
pere at hungry.com
Sat Mar 5 17:45:15 CET 2011
[Petter Reinholdtsen]
> The last commit (71a81d5c371f737b75ab087d618b75b3986a57d5) seem to
> have solved this issue, but introduced another. Visiting
> <URL:http://www.fiksgatami.no/report/14> and clicking on "Flere
> saker i nærheten" send me to a page without the correct map view. :(
This patch seem to solve the issue, by forcing lat/lon to be reported
with period as decimal point in the URL.
diff --git a/web/index.cgi b/web/index.cgi
index f8f119f..3677206 100755
--- a/web/index.cgi
+++ b/web/index.cgi
@@ -1056,7 +1056,8 @@ sub display_problem {
my $contact_url = Cobrand::url($cobrand, NewURL($q, -retain => 1, pc => unde
my $back = Cobrand::url($cobrand, NewURL($q, -url => '/',
- lat => $short_lat, lon => $short_lon,
+ lat => mySociety::Locale::in_gb_locale { sprintf("%f", $short_lat)},
+ lon => mySociety::Locale::in_gb_locale { sprintf("%f", $short_lon)},
-retain => 1, pc => undef, x => undef, 'y' => undef, id => undef
), $q);
my $fixed = ($input{fixed}) ? ' checked' : '';
Happy hacking,
--
Petter Reinholdtsen
More information about the fiksgatami
mailing list