aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/Script/Alerts.pm
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-04-22 16:48:57 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-05-18 12:57:52 +0100
commit1a1bfff12415a7793fee22bcd4e5e39e10dbd4d3 (patch)
tree6313f583e4e278ad3fb2885b8bd0493bd429b23c /perllib/FixMyStreet/Script/Alerts.pm
parent66d93ceaed9df6ff3e0e28a62e655ad769c99614 (diff)
Fallback if request to Gaze fails.
Fixes #1286.
Diffstat (limited to 'perllib/FixMyStreet/Script/Alerts.pm')
-rw-r--r--perllib/FixMyStreet/Script/Alerts.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/Script/Alerts.pm b/perllib/FixMyStreet/Script/Alerts.pm
index e799a5446..fc5fef953 100644
--- a/perllib/FixMyStreet/Script/Alerts.pm
+++ b/perllib/FixMyStreet/Script/Alerts.pm
@@ -7,7 +7,7 @@ use DateTime::Format::Pg;
use IO::String;
use mySociety::DBHandle qw(dbh);
-use mySociety::Gaze;
+use FixMyStreet::Gaze;
use mySociety::Locale;
use mySociety::MaPit;
use RABX;
@@ -175,10 +175,10 @@ sub send() {
my $longitude = $alert->parameter;
my $latitude = $alert->parameter2;
- my $d = mySociety::Gaze::get_radius_containing_population($latitude, $longitude, 200000);
+ my $d = FixMyStreet::Gaze::get_radius_containing_population($latitude, $longitude);
# Convert integer to GB locale string (with a ".")
$d = mySociety::Locale::in_gb_locale {
- sprintf("%f", int($d*10+0.5)/10);
+ sprintf("%f", $d);
};
my $states = "'" . join( "', '", FixMyStreet::DB::Result::Problem::visible_states() ) . "'";
my %data = (