diff options
Diffstat (limited to 'perllib/FixMyStreet/Map.pm')
-rw-r--r-- | perllib/FixMyStreet/Map.pm | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/perllib/FixMyStreet/Map.pm b/perllib/FixMyStreet/Map.pm index 704b19bee..0fa23d081 100644 --- a/perllib/FixMyStreet/Map.pm +++ b/perllib/FixMyStreet/Map.pm @@ -119,16 +119,8 @@ sub map_pins { my ( $min_lon, $min_lat, $max_lon, $max_lat ) = split /,/, $bbox; my $category = $c->req->param('filter_category'); - # Filter reports by status, if present in query params - my $states; - my $status = $c->req->param('status') || $c->cobrand->on_map_default_status; - if ( $status eq 'all' ) { - $states = FixMyStreet::DB::Result::Problem->visible_states(); - } elsif ( $status eq 'open' ) { - $states = FixMyStreet::DB::Result::Problem->open_states(); - } elsif ( $status eq 'fixed' ) { - $states = FixMyStreet::DB::Result::Problem->fixed_states(); - } + $c->forward( '/reports/stash_report_filter_status' ); + my $states = $c->stash->{filter_problem_states}; my ( $around_map, $around_map_list, $nearby, $dist ) = FixMyStreet::Map::map_features_bounds( $c, $min_lon, $min_lat, $max_lon, $max_lat, $interval, $category, $states ); |