aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorJérémy Benoist <j0k3r@users.noreply.github.com>2018-09-21 09:46:58 +0000
committerGitHub <noreply@github.com>2018-09-21 09:46:58 +0000
commit2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08 (patch)
treea145b39f411f1981444fa68ad26f8789abdfa35a /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parent2f3af70e1ae6f9dd403e87d232ddf5315e34e430 (diff)
parent9007fe006286c63a7793326d9429792383ebd76d (diff)
downloadwallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.tar.gz
wallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.tar.zst
wallabag-2b6380f5acaecaa7aa04c12d7bf4fd7c84b60b08.zip
Merge pull request #3630 from sviande/archived_at
Entry: add archived_at property and updateArchived method
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);