aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/My.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/My.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm13
1 files changed, 10 insertions, 3 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 19b3ffee0..1021f7056 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -30,8 +30,12 @@ sub my : Path : Args(0) {
my $pins = [];
my $problems = {};
- my $rs = $c->user->problems->search( undef,
- { rows => 50 } )->page( $p_page );
+ my $rs = $c->user->problems->search( {
+ state => [ 'confirmed', 'fixed' ],
+ }, {
+ order_by => { -desc => 'confirmed' },
+ rows => 50
+ } )->page( $p_page );
while ( my $problem = $rs->next ) {
push @$pins, {
@@ -48,7 +52,10 @@ sub my : Path : Args(0) {
$rs = $c->user->comments->search(
{ state => 'confirmed' },
- { rows => 50 } )->page( $u_page );
+ {
+ order_by => { -desc => 'confirmed' },
+ rows => 50
+ } )->page( $u_page );
my @updates = $rs->all;
$c->stash->{updates} = \@updates;
$c->stash->{updates_pager} = $rs->pager;