diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Around.pm | 3 | ||||
-rw-r--r-- | perllib/FixMyStreet/Cobrand/Default.pm | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Around.pm b/perllib/FixMyStreet/App/Controller/Around.pm index 85b623372..f25b149e6 100644 --- a/perllib/FixMyStreet/App/Controller/Around.pm +++ b/perllib/FixMyStreet/App/Controller/Around.pm @@ -164,6 +164,7 @@ sub display_location : Private { my $all_pins = $c->req->param('all_pins') ? 1 : undef; $c->stash->{all_pins} = $all_pins; my $interval = $all_pins ? undef : $c->cobrand->on_map_default_max_pin_age; + my $states = $c->cobrand->on_map_default_states; # Check the category to filter by, if any, is valid $c->forward('check_and_stash_category'); @@ -171,7 +172,7 @@ sub display_location : Private { # get the map features my ( $on_map_all, $on_map, $around_map, $distance ) = FixMyStreet::Map::map_features( $c, $latitude, $longitude, - $interval, $c->stash->{category} ); + $interval, $c->stash->{category}, $states ); # copy the found reports to the stash $c->stash->{on_map} = $on_map; diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm index 228865c78..590288050 100644 --- a/perllib/FixMyStreet/Cobrand/Default.pm +++ b/perllib/FixMyStreet/Cobrand/Default.pm @@ -366,6 +366,15 @@ Return the default maximum age for pins. sub on_map_default_max_pin_age { return '6 months'; } +=head2 on_map_default_states + +Return the default filter to use for report states on map page. +Return undef to show all visible reports. + +=cut + +sub on_map_default_states { return undef; } + =head2 allow_photo_upload Return a boolean indicating whether the cobrand allows photo uploads |