diff options
author | Struan Donald <struan@exo.org.uk> | 2011-06-10 17:42:28 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-08-09 18:32:04 +0100 |
commit | 314fc5d31215252a9f5908cd321266d3832500cb (patch) | |
tree | 3252dfbd58186135bfca90a17e44237ba2b70753 /perllib/FixMyStreet/App/Controller/Admin.pm | |
parent | bf2583d2221e75f7cecdd94ca573b0ecc4d387de (diff) |
reuse report table row generating template code
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index de90321a0..c0e6a9475 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -448,9 +448,11 @@ sub search_reports : Path('search_reports') { } ); + # we need to pass this in as an array as we can't + # query the object in the template as the quoting + # will have been turned off $c->stash->{problems} = [ $problems->all ]; - $c->stash->{edit_council_contacts} = 1 if ( grep {$_ eq 'councilcontacts'} keys %{$c->stash->{allowed_pages}}); @@ -722,7 +724,9 @@ sub list_flagged : Path('list_flagged') : Args(0) { my $problems = $c->model('DB::Problem')->search( { flagged => 1 } ); - $c->stash->{problems} = $problems; + # pass in as array ref as using same template as search_reports + # which has to use an array ref for sql quoting reasons + $c->stash->{problems} = [ $problems->all ]; my $users = $c->model('DB::User')->search( { flagged => 1 } ); |