diff options
Diffstat (limited to 'perllib/FixMyStreet')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 6 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/TfL.pm | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 49ff13999..fb3670fb7 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -329,12 +329,14 @@ sub nearby : Path { my ($self, $c) = @_; my $states = FixMyStreet::DB::Result::Problem->open_states(); - $c->forward('/report/_nearby_json', [ { + my $params = { latitude => $c->get_param('latitude'), longitude => $c->get_param('longitude'), categories => [ $c->get_param('filter_category') || () ], states => $states, - } ]); + }; + $c->cobrand->call_hook('around_nearby_filter', $params); + $c->forward('/report/_nearby_json', [ $params ]); } sub location_closest_address : Path('/ajax/closest') { diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm index e4a4bced6..1449a9614 100644 --- a/perllib/FixMyStreet/Cobrand/TfL.pm +++ b/perllib/FixMyStreet/Cobrand/TfL.pm @@ -172,6 +172,12 @@ sub admin_allow_user { return $user->from_body->name eq 'TfL'; } +sub around_nearby_filter { + my ($self, $params) = @_; + # Include all reports in duplicate spotting + delete $params->{states}; +} + sub state_groups_inspect { my $rs = FixMyStreet::DB->resultset("State"); my @open = grep { $_ !~ /^(planned|action scheduled|for triage)$/ } FixMyStreet::DB::Result::Problem->open_states; |