diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Reports.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 99786269b..82418fc48 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -121,8 +121,8 @@ sub ward : Path : Args(2) { $c->stash->{stats} = $c->cobrand->get_report_stats(); $c->stash->{filter_status} = $c->cobrand->on_map_default_status; - my $status = $c->req->param('status') || ''; - if ( !defined $c->cobrand->on_map_default_states || $status eq 'all' ) { + my $status = $c->req->param('status') || $c->cobrand->on_map_default_status; + if ( $status eq 'all' ) { $c->stash->{filter_status} = 'all'; } elsif ( $status eq 'open' ) { $c->stash->{filter_status} = 'open'; @@ -399,9 +399,9 @@ sub load_and_group_problems : Private { # Unlike the 't' query param, 'status' isn't affected by # the age of a report, so treat the filtering separately. # If 't' is specified, it will override 'status'. - my $states = $c->cobrand->on_map_default_states; - my $status = $c->req->param('status') || ''; - if ( !defined $states || $status eq 'all' ) { + 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(); |