diff options
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Admin.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 535a8d08e..8f8d7cc47 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -644,6 +644,9 @@ sub category : Chained('body') : PathPart('') { sub reports : Path('reports') { my ( $self, $c ) = @_; + $c->stash->{edit_body_contacts} = 1 + if grep { $_ eq 'body' } keys %{$c->stash->{allowed_pages}}; + my $query = {}; if ( $c->cobrand->moniker eq 'zurich' ) { my $type = $c->stash->{admin_type}; @@ -666,6 +669,8 @@ sub reports : Path('reports') { my $p_page = $c->get_param('p') || 1; my $u_page = $c->get_param('u') || 1; + return if $c->cobrand->call_hook(report_search_query => $query, $p_page, $u_page, $order); + if (my $search = $c->get_param('search')) { $c->stash->{searched} = $search; @@ -786,10 +791,6 @@ sub reports : Path('reports') { $c->stash->{problems} = [ $problems->all ]; $c->stash->{problems_pager} = $problems->pager; } - - $c->stash->{edit_body_contacts} = 1 - if ( grep {$_ eq 'body'} keys %{$c->stash->{allowed_pages}}); - } sub update_user : Private { |