diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-14 14:49:52 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2017-07-14 14:49:52 +0100 |
commit | 99e1a43cdba0e52d2832747d3b53aec0fbe2f4fe (patch) | |
tree | 872e380a0ec68a4945ba5b0c3789dc957e17c42f /perllib/FixMyStreet/App/Controller | |
parent | 6f23d7b44ddc2556897e920cb88a3c81357605bf (diff) | |
parent | f604fb2765b2845ddf5c8ba12832348e9d59016c (diff) |
Merge branch 'new-reports-in-core'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index 024a23872..8f068f0ec 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -384,8 +384,6 @@ sub load_and_group_problems : Private { $c->forward('stash_report_sort', [ $c->cobrand->reports_ordering ]); my $page = $c->get_param('p') || 1; - # NB: If 't' is specified, it will override 'status'. - my $type = $c->get_param('t') || 'all'; my $category = [ $c->get_param_list('filter_category', 1) ]; my $states = $c->stash->{filter_problem_states}; @@ -413,25 +411,6 @@ sub load_and_group_problems : Private { $where->{'me.id'} = { -not_in => $shortlisted_ids }; } - my $not_open = [ FixMyStreet::DB::Result::Problem::fixed_states(), FixMyStreet::DB::Result::Problem::closed_states() ]; - if ( $type eq 'new' ) { - $where->{confirmed} = { '>', \"current_timestamp - INTERVAL '4 week'" }; - $where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] }; - } elsif ( $type eq 'older' ) { - $where->{confirmed} = { '<', \"current_timestamp - INTERVAL '4 week'" }; - $where->{lastupdate} = { '>', \"current_timestamp - INTERVAL '8 week'" }; - $where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] }; - } elsif ( $type eq 'unknown' ) { - $where->{lastupdate} = { '<', \"current_timestamp - INTERVAL '8 week'" }; - $where->{state} = { 'IN', [ FixMyStreet::DB::Result::Problem::open_states() ] }; - } elsif ( $type eq 'fixed' ) { - $where->{lastupdate} = { '>', \"current_timestamp - INTERVAL '8 week'" }; - $where->{state} = $not_open; - } elsif ( $type eq 'older_fixed' ) { - $where->{lastupdate} = { '<', \"current_timestamp - INTERVAL '8 week'" }; - $where->{state} = $not_open; - } - if (@$category) { $where->{category} = $category; } |