diff options
author | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2011-08-19 00:08:15 +0100 |
commit | a9a4fed583d7467c9c1f1fa56d42bcb75b4b488c (patch) | |
tree | 72941901b1bad732047bc6289139a387b049e6e8 /perllib/FixMyStreet/App/Controller/JSON.pm | |
parent | 302f5961f5da13e8124e8d2e91e52a29f141946f (diff) | |
parent | 61e6d5928be1bedb68607f8fa36f0d971711a3f8 (diff) |
Merge branch 'new_statuses'
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/JSON.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/JSON.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/JSON.pm b/perllib/FixMyStreet/App/Controller/JSON.pm index a89fb3e6c..f3607341a 100644 --- a/perllib/FixMyStreet/App/Controller/JSON.pm +++ b/perllib/FixMyStreet/App/Controller/JSON.pm @@ -71,12 +71,12 @@ sub problems : Local { } # query the database - my ( $state, $date_col ); + my ( @state, $date_col ); if ( $type eq 'new_problems' ) { - $state = 'confirmed'; + @state = FixMyStreet::DB::Result::Problem->open_states(); $date_col = 'confirmed'; } elsif ( $type eq 'fixed_problems' ) { - $state = 'fixed'; + @state = FixMyStreet::DB::Result::Problem->fixed_states(); $date_col = 'lastupdate'; } @@ -86,7 +86,7 @@ sub problems : Local { '>=' => $start_dt, '<=' => $end_dt + $one_day, }, - state => $state, + state => [ @state ], }; $query->{category} = $category if $category; my @problems = $c->cobrand->problems->search( $query, { |