aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-05 22:33:36 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-02-05 22:33:36 +0100
commit905ae369bd0238cc24c3c4e0ac60d578d30b54bb (patch)
tree262f350c30eea94316242362b0246f92c5344987 /src/Wallabag/CoreBundle/Repository
parentc8dee953961964aa842e516995f0c6fafd007f9b (diff)
downloadwallabag-905ae369bd0238cc24c3c4e0ac60d578d30b54bb.tar.gz
wallabag-905ae369bd0238cc24c3c4e0ac60d578d30b54bb.tar.zst
wallabag-905ae369bd0238cc24c3c4e0ac60d578d30b54bb.zip
normalize entries fields
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntriesRepository.php16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
index ae854e5a..9965317a 100644
--- a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
@@ -23,9 +23,9 @@ class EntriesRepository extends EntityRepository
23 ->select('e') 23 ->select('e')
24 ->setFirstResult($firstResult) 24 ->setFirstResult($firstResult)
25 ->setMaxResults($maxResults) 25 ->setMaxResults($maxResults)
26 ->where('e.isRead = 0') 26 ->where('e.isArchived = false')
27 ->andWhere('e.userId =:userId')->setParameter('userId', $userId) 27 ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
28 ->andWhere('e.isDeleted=0') 28 ->andWhere('e.isDeleted=false')
29 ->orderBy('e.createdAt', 'desc') 29 ->orderBy('e.createdAt', 'desc')
30 ->getQuery(); 30 ->getQuery();
31 31
@@ -48,9 +48,9 @@ class EntriesRepository extends EntityRepository
48 ->select('e') 48 ->select('e')
49 ->setFirstResult($firstResult) 49 ->setFirstResult($firstResult)
50 ->setMaxResults($maxResults) 50 ->setMaxResults($maxResults)
51 ->where('e.isRead = 1') 51 ->where('e.isArchived = true')
52 ->andWhere('e.userId =:userId')->setParameter('userId', $userId) 52 ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
53 ->andWhere('e.isDeleted=0') 53 ->andWhere('e.isDeleted=false')
54 ->orderBy('e.createdAt', 'desc') 54 ->orderBy('e.createdAt', 'desc')
55 ->getQuery(); 55 ->getQuery();
56 56
@@ -73,9 +73,9 @@ class EntriesRepository extends EntityRepository
73 ->select('e') 73 ->select('e')
74 ->setFirstResult($firstResult) 74 ->setFirstResult($firstResult)
75 ->setMaxResults($maxResults) 75 ->setMaxResults($maxResults)
76 ->where('e.isFav = 1') 76 ->where('e.isStarred = true')
77 ->andWhere('e.userId =:userId')->setParameter('userId', $userId) 77 ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
78 ->andWhere('e.isDeleted=0') 78 ->andWhere('e.isDeleted=false')
79 ->orderBy('e.createdAt', 'desc') 79 ->orderBy('e.createdAt', 'desc')
80 ->getQuery(); 80 ->getQuery();
81 81
@@ -91,11 +91,11 @@ class EntriesRepository extends EntityRepository
91 ->where('e.userId =:userId')->setParameter('userId', $userId); 91 ->where('e.userId =:userId')->setParameter('userId', $userId);
92 92
93 if (!is_null($isArchived)) { 93 if (!is_null($isArchived)) {
94 $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived); 94 $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', $isArchived);
95 } 95 }
96 96
97 if (!is_null($isStarred)) { 97 if (!is_null($isStarred)) {
98 $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred); 98 $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', $isStarred);
99 } 99 }
100 100
101 if (!is_null($isDeleted)) { 101 if (!is_null($isDeleted)) {