]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Use created_at as default sort 2534/head
authorJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 4 Nov 2016 06:34:37 +0000 (07:34 +0100)
committerJeremy Benoist <jeremy.benoist@gmail.com>
Fri, 4 Nov 2016 06:34:38 +0000 (07:34 +0100)
Imported content use the real creation date. If we sort by id, it'll
display contents in reverse order.

src/Wallabag/CoreBundle/Repository/EntryRepository.php

index cd2b47b9f7c32b737d35910effe1cf53398adac8..4f03ae0f160762525262f510eba20063df61660b 100644 (file)
@@ -22,7 +22,7 @@ class EntryRepository extends EntityRepository
         return $this->createQueryBuilder('e')
             ->leftJoin('e.user', 'u')
             ->andWhere('u.id = :userId')->setParameter('userId', $userId)
-            ->orderBy('e.id', 'desc')
+            ->orderBy('e.createdAt', 'desc')
         ;
     }