diff options
author | Marius Halden <marius.h@lden.org> | 2015-08-26 13:43:10 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2015-08-26 13:43:10 +0200 |
commit | cc0acdd34052e79f3df368ac1f524de31df19a1b (patch) | |
tree | 505f561b5f16c5b78f07514e8c2b2bdc18fef51d /perllib/FixMyStreet/App/Controller/Dashboard.pm | |
parent | 1c5c685d0b0904e7ddc6e764e58e8fae08632d1d (diff) | |
parent | 6b84622fb7d58531baa7943abdcc7620999c34ee (diff) |
Merge tag 'v1.6.1' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Dashboard.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Dashboard.pm | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Dashboard.pm b/perllib/FixMyStreet/App/Controller/Dashboard.pm index 25c6e1923..c3aa35008 100644 --- a/perllib/FixMyStreet/App/Controller/Dashboard.pm +++ b/perllib/FixMyStreet/App/Controller/Dashboard.pm @@ -32,9 +32,9 @@ sub example : Local : Args(0) { #$c->forward( '/report/new/setup_categories_and_bodies' ); # See if we've had anything from the dropdowns - perhaps vary results if so - $c->stash->{ward} = $c->req->param('ward'); - $c->stash->{category} = $c->req->param('category'); - $c->stash->{q_state} = $c->req->param('state'); + $c->stash->{ward} = $c->get_param('ward'); + $c->stash->{category} = $c->get_param('category'); + $c->stash->{q_state} = $c->get_param('state'); eval { my $data = File::Slurp::read_file( @@ -108,8 +108,8 @@ sub index : Path : Args(0) { # See if we've had anything from the dropdowns - $c->stash->{ward} = $c->req->param('ward'); - $c->stash->{category} = $c->req->param('category'); + $c->stash->{ward} = $c->get_param('ward'); + $c->stash->{category} = $c->get_param('category'); my %where = ( bodies_str => $body->id, # XXX Does this break in a two tier council? Restriction needs looking at... @@ -128,7 +128,7 @@ sub index : Path : Args(0) { my $dtf = $c->model('DB')->storage->datetime_parser; my %counts; - my $now = DateTime->now( time_zone => 'local' ); + my $now = DateTime->now( time_zone => FixMyStreet->local_time_zone ); my $t = $now->clone->truncate( to => 'day' ); $counts{wtd} = $c->forward( 'updates_search', [ $dtf->format_datetime( $t->clone->subtract( days => $t->dow - 1 ) ) ] ); @@ -143,7 +143,7 @@ sub index : Path : Args(0) { # List of reports underneath summary table - $c->stash->{q_state} = $c->req->param('state') || ''; + $c->stash->{q_state} = $c->get_param('state') || ''; if ( $c->stash->{q_state} eq 'fixed' ) { $prob_where->{'me.state'} = [ FixMyStreet::DB::Result::Problem->fixed_states() ]; } elsif ( $c->stash->{q_state} ) { @@ -170,7 +170,7 @@ sub index : Path : Args(0) { } $c->stash->{lists} = \%problems; - if ( $c->req->params->{export} ) { + if ( $c->get_param('export') ) { $self->export_as_csv($c, $problems_rs, $body); } } |