aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 83379998..93c630c0 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 }
@@ -189,6 +189,8 @@ class EntryRepository extends EntityRepository
189 $qb->orderBy('e.id', $order); 189 $qb->orderBy('e.id', $order);
190 } elseif ('updated' === $sort) { 190 } elseif ('updated' === $sort) {
191 $qb->orderBy('e.updatedAt', $order); 191 $qb->orderBy('e.updatedAt', $order);
192 } elseif ('archived' === $sort) {
193 $qb->orderBy('e.archivedAt', $order);
192 } 194 }
193 195
194 $pagerAdapter = new DoctrineORMAdapter($qb, true, false); 196 $pagerAdapter = new DoctrineORMAdapter($qb, true, false);