diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-05-27 23:05:55 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-05-27 23:05:55 +0100 |
commit | d1b78f79167fbff4d9fdb6e0f0a1d61a5786efa2 (patch) | |
tree | b5f8a92f406c5151f2c3048d143daf5026a6b398 | |
parent | d3c9166c0d05a7467f89a3a9e6156d738adc2f47 (diff) |
Make sure integer is in GB locale.
-rw-r--r-- | perllib/FixMyStreet/Alert.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/Alert.pm b/perllib/FixMyStreet/Alert.pm index bf6a6c5d4..06873c228 100644 --- a/perllib/FixMyStreet/Alert.pm +++ b/perllib/FixMyStreet/Alert.pm @@ -188,7 +188,10 @@ sub email_alerts ($) { $url = Cobrand::base_url_for_emails($alert->{cobrand}, $alert->{cobrand_data}); my ($site_restriction, $site_id) = Cobrand::site_restriction($alert->{cobrand}, $alert->{cobrand_data}); my $d = mySociety::Gaze::get_radius_containing_population($latitude, $longitude, 200000); - $d = int($d*10+0.5)/10; + # Convert integer to GB locale string (with a ".") + $d = mySociety::Locale::in_gb_locale { + sprintf("%f", int($d*10+0.5)/10); + }; my $testing_email_clause = "and problem.email <> '$testing_email'" if $testing_email; my %data = ( template => $template, data => '', alert_id => $alert->{id}, alert_email => $alert->{email}, lang => $alert->{lang}, cobrand => $alert->{cobrand}, cobrand_data => $alert->{cobrand_data} ); my $q = "select * from problem_find_nearby(?, ?, ?) as nearby, problem |