aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-20 15:36:25 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-03-06 20:50:30 +0100
commit1d14779154481b320e1c44fccf2558d8c9fa43a1 (patch)
tree45fbcb70457459b2359828fd035bb8936442fc02 /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parentaa4d6562c196926a55819326b0fbe504daf2156f (diff)
downloadwallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.tar.gz
wallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.tar.zst
wallabag-1d14779154481b320e1c44fccf2558d8c9fa43a1.zip
remove isDeleted flag
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 32394d2a..005142fc 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -24,7 +24,6 @@ class EntryRepository extends EntityRepository
24 ->leftJoin('e.user', 'u') 24 ->leftJoin('e.user', 'u')
25 ->where('e.isArchived = false') 25 ->where('e.isArchived = false')
26 ->andWhere('u.id =:userId')->setParameter('userId', $userId) 26 ->andWhere('u.id =:userId')->setParameter('userId', $userId)
27 ->andWhere('e.isDeleted=false')
28 ->orderBy('e.createdAt', 'desc') 27 ->orderBy('e.createdAt', 'desc')
29 ->getQuery(); 28 ->getQuery();
30 29
@@ -51,7 +50,6 @@ class EntryRepository extends EntityRepository
51 ->leftJoin('e.user', 'u') 50 ->leftJoin('e.user', 'u')
52 ->where('e.isArchived = true') 51 ->where('e.isArchived = true')
53 ->andWhere('u.id =:userId')->setParameter('userId', $userId) 52 ->andWhere('u.id =:userId')->setParameter('userId', $userId)
54 ->andWhere('e.isDeleted=false')
55 ->orderBy('e.createdAt', 'desc') 53 ->orderBy('e.createdAt', 'desc')
56 ->getQuery(); 54 ->getQuery();
57 55
@@ -78,7 +76,6 @@ class EntryRepository extends EntityRepository
78 ->leftJoin('e.user', 'u') 76 ->leftJoin('e.user', 'u')
79 ->where('e.isStarred = true') 77 ->where('e.isStarred = true')
80 ->andWhere('u.id =:userId')->setParameter('userId', $userId) 78 ->andWhere('u.id =:userId')->setParameter('userId', $userId)
81 ->andWhere('e.isDeleted = false')
82 ->orderBy('e.createdAt', 'desc') 79 ->orderBy('e.createdAt', 'desc')
83 ->getQuery(); 80 ->getQuery();
84 81
@@ -93,13 +90,12 @@ class EntryRepository extends EntityRepository
93 * @param int $userId 90 * @param int $userId
94 * @param bool $isArchived 91 * @param bool $isArchived
95 * @param bool $isStarred 92 * @param bool $isStarred
96 * @param bool $isDeleted
97 * @param string $sort 93 * @param string $sort
98 * @param string $order 94 * @param string $order
99 * 95 *
100 * @return array 96 * @return array
101 */ 97 */
102 public function findEntries($userId, $isArchived = null, $isStarred = null, $isDeleted = null, $sort = 'created', $order = 'ASC') 98 public function findEntries($userId, $isArchived = null, $isStarred = null, $sort = 'created', $order = 'ASC')
103 { 99 {
104 $qb = $this->createQueryBuilder('e') 100 $qb = $this->createQueryBuilder('e')
105 ->where('e.user =:userId')->setParameter('userId', $userId); 101 ->where('e.user =:userId')->setParameter('userId', $userId);
@@ -112,10 +108,6 @@ class EntryRepository extends EntityRepository
112 $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', (bool) $isStarred); 108 $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', (bool) $isStarred);
113 } 109 }
114 110
115 if (null !== $isDeleted) {
116 $qb->andWhere('e.isDeleted =:isDeleted')->setParameter('isDeleted', (bool) $isDeleted);
117 }
118
119 if ('created' === $sort) { 111 if ('created' === $sort) {
120 $qb->orderBy('e.createdAt', $order); 112 $qb->orderBy('e.createdAt', $order);
121 } elseif ('updated' === $sort) { 113 } elseif ('updated' === $sort) {