From ce11952447e9e8e6c5ebcd837331735ba1e7fd6f Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Fri, 4 Nov 2016 07:34:37 +0100 Subject: Use created_at as default sort 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag') diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index cd2b47b9..4f03ae0f 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -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') ; } -- cgit v1.2.3