diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index cebce714..8b6cf443 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -50,7 +50,7 @@ class EntryRepository extends EntityRepository | |||
50 | public function getBuilderForArchiveByUser($userId) | 50 | public function getBuilderForArchiveByUser($userId) |
51 | { | 51 | { |
52 | return $this | 52 | return $this |
53 | ->getSortedQueryBuilderByUser($userId) | 53 | ->getSortedQueryBuilderByUser($userId, 'archivedAt', 'desc') |
54 | ->andWhere('e.isArchived = true') | 54 | ->andWhere('e.isArchived = true') |
55 | ; | 55 | ; |
56 | } | 56 | } |
@@ -193,6 +193,8 @@ class EntryRepository extends EntityRepository | |||
193 | $qb->orderBy('e.id', $order); | 193 | $qb->orderBy('e.id', $order); |
194 | } elseif ('updated' === $sort) { | 194 | } elseif ('updated' === $sort) { |
195 | $qb->orderBy('e.updatedAt', $order); | 195 | $qb->orderBy('e.updatedAt', $order); |
196 | } elseif ('archived' === $sort) { | ||
197 | $qb->orderBy('e.archivedAt', $order); | ||
196 | } | 198 | } |
197 | 199 | ||
198 | $pagerAdapter = new DoctrineORMAdapter($qb, true, false); | 200 | $pagerAdapter = new DoctrineORMAdapter($qb, true, false); |