diff options
author | Marius Halden <marius.h@lden.org> | 2016-03-28 20:38:28 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-03-28 20:38:28 +0200 |
commit | 6c1118dbf2c4b15bcfcd77600d36f2389428c75e (patch) | |
tree | da81756a344a89502df5479b860b6f4a24b6ed92 /perllib/FixMyStreet/App/Controller/My.pm | |
parent | a2d67ca6de255ff04badb7cb5a62f7d3df3ce293 (diff) | |
parent | 4345263c9de752454795ad57323e684e41e702a8 (diff) |
Merge tag 'v1.8.1' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/My.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm index 3c4ce2cf7..8eb7f079e 100644 --- a/perllib/FixMyStreet/App/Controller/My.pm +++ b/perllib/FixMyStreet/App/Controller/My.pm @@ -36,6 +36,7 @@ sub my : Path : Args(0) { my $states = $c->stash->{filter_problem_states}; my $params = { state => [ keys %$states ], + user_id => $c->user->id, }; my $category = $c->get_param('filter_category'); @@ -44,9 +45,7 @@ sub my : Path : Args(0) { $c->stash->{filter_category} = $category; } - my $rs = $c->user->problems - ->to_body($c->cobrand->body_restriction) - ->search( $params, { + my $rs = $c->cobrand->problems->search( $params, { order_by => { -desc => 'confirmed' }, rows => 50 } )->page( $p_page ); @@ -77,7 +76,7 @@ sub my : Path : Args(0) { $c->stash->{updates} = \@updates; $c->stash->{updates_pager} = $rs->pager; - my @categories = $c->user->problems->search( undef, { + my @categories = $c->cobrand->problems->search( { user_id => $c->user->id }, { columns => [ 'category' ], distinct => 1, order_by => [ 'category' ], |