aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Report.pm
diff options
context:
space:
mode:
authorSteven Day <steve@mysociety.org>2015-08-12 17:42:41 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2018-05-02 13:34:54 +0100
commita344b99a0bf37134079afda51c6f963e1163904b (patch)
tree920bfa86c19113f9a2c99d401da885cea5e9f078 /perllib/FixMyStreet/App/Controller/Report.pm
parentb002374a885736b7436fc1c3132e50b6a1f8bdf9 (diff)
Allow cobrands to give extra parameters for pins.
So that you can build functionality to add extra limitations on to the map pins displayed. Useful for Collideoscope initially to filter out (or in) reports from the Department of Transport's Stats19 Data.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Report.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Report.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Report.pm b/perllib/FixMyStreet/App/Controller/Report.pm
index e36085d05..3f79a99f7 100644
--- a/perllib/FixMyStreet/App/Controller/Report.pm
+++ b/perllib/FixMyStreet/App/Controller/Report.pm
@@ -553,8 +553,10 @@ sub nearby_json : Private {
# This is for the list template, this is a list on that page.
$c->stash->{page} = 'report';
+ my $extra_params = $c->cobrand->call_hook('display_location_extra_params');
+
my $nearby = $c->model('DB::Nearby')->nearby(
- $c, $dist, [ $p->id ], 5, $p->latitude, $p->longitude, [ $p->category ], undef
+ $c, $dist, [ $p->id ], 5, $p->latitude, $p->longitude, [ $p->category ], undef, $extra_params
);
# Want to treat these as if they were on map
$nearby = [ map { $_->problem } @$nearby ];