aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository
diff options
context:
space:
mode:
authorNicolas Lœuillet <nicolas@loeuillet.org>2015-02-04 18:12:13 +0100
committerNicolas Lœuillet <nicolas@loeuillet.org>2015-02-04 18:12:13 +0100
commit6079aaa33dc78772e497725d7247c371b80b5578 (patch)
treeeed33e91176768d7c858bb83e23fde6ea4475da5 /src/Wallabag/CoreBundle/Repository
parent6e334aba689f891a229c8a57f908f10dad5b3759 (diff)
downloadwallabag-6079aaa33dc78772e497725d7247c371b80b5578.tar.gz
wallabag-6079aaa33dc78772e497725d7247c371b80b5578.tar.zst
wallabag-6079aaa33dc78772e497725d7247c371b80b5578.zip
change delete status for GET /api/entries method
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntriesRepository.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
index aaca4251..dd92d520 100644
--- a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php
@@ -86,8 +86,7 @@ class EntriesRepository extends EntityRepository
86 //TODO tous les paramètres ne sont pas utilisés, à corriger 86 //TODO tous les paramètres ne sont pas utilisés, à corriger
87 $qb = $this->createQueryBuilder('e') 87 $qb = $this->createQueryBuilder('e')
88 ->select('e') 88 ->select('e')
89 ->where('e.userId =:userId')->setParameter('userId', $userId) 89 ->where('e.userId =:userId')->setParameter('userId', $userId);
90 ->andWhere('e.isDeleted=0');
91 90
92 if (!is_null($isArchived)) { 91 if (!is_null($isArchived)) {
93 $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived); 92 $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived);
@@ -97,6 +96,10 @@ class EntriesRepository extends EntityRepository
97 $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred); 96 $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred);
98 } 97 }
99 98
99 if (!is_null($isDeleted)) {
100 $qb->andWhere('e.isDeleted =:isDeleted')->setParameter('isDeleted', $isDeleted);
101 }
102
100 return $qb 103 return $qb
101 ->getQuery() 104 ->getQuery()
102 ->getResult(Query::HYDRATE_ARRAY); 105 ->getResult(Query::HYDRATE_ARRAY);