diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-18 15:30:35 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-05-18 15:30:35 +0100 |
commit | 173abd37716cb49cde3d4836a9cf51a285bd3b79 (patch) | |
tree | 4be29d9830e00b243d6b7bfdbf410a9bfad84c64 /perllib/FixMyStreet/App | |
parent | d4a75fd58381f2964607a2937946202e34cb6f30 (diff) | |
parent | 1a1bfff12415a7793fee22bcd4e5e39e10dbd4d3 (diff) |
Merge branch '1286-catching-gaze'
Diffstat (limited to 'perllib/FixMyStreet/App')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Alert.pm | 7 | ||||
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 10 |
2 files changed, 7 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Alert.pm b/perllib/FixMyStreet/App/Controller/Alert.pm index 6972bbc04..ddda02abd 100644 --- a/perllib/FixMyStreet/App/Controller/Alert.pm +++ b/perllib/FixMyStreet/App/Controller/Alert.pm @@ -5,6 +5,7 @@ use namespace::autoclean; BEGIN { extends 'Catalyst::Controller'; } use mySociety::EmailUtil qw(is_valid_email); +use FixMyStreet::Gaze; =head1 NAME @@ -441,11 +442,7 @@ sub determine_location : Private { $c->go('index'); } - my $dist = - mySociety::Gaze::get_radius_containing_population( $c->stash->{latitude}, - $c->stash->{longitude}, 200000 ); - $dist = int( $dist * 10 + 0.5 ); - $dist = $dist / 10.0; + my $dist = FixMyStreet::Gaze::get_radius_containing_population($c->stash->{latitude}, $c->stash->{longitude}); $c->stash->{population_radius} = $dist; return 1; diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 8d4f8313c..183b233a8 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -8,7 +8,7 @@ use XML::RSS; use FixMyStreet::App::Model::PhotoSet; -use mySociety::Gaze; +use FixMyStreet::Gaze; use mySociety::Locale; use mySociety::MaPit; use mySociety::Sundries qw(ordinal); @@ -143,10 +143,10 @@ sub local_problems_ll : Private { $c->stash->{qs} .= ";d=$d"; $d = 100 if $d > 100; } else { - $d = mySociety::Gaze::get_radius_containing_population( $lat, $lon, 200000 ); - $d = int( $d * 10 + 0.5 ) / 10; - mySociety::Locale::in_gb_locale { - $d = sprintf("%f", $d); + $d = FixMyStreet::Gaze::get_radius_containing_population($lat, $lon); + # Needs to be with a '.' for db passing + $d = mySociety::Locale::in_gb_locale { + sprintf("%f", $d); } } |