]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntriesRepository.php
normalize entries fields
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntriesRepository.php
index ae854e5a91b8fbe1ed3da3f85c121c38c03a1d59..9965317aefd116c74da11fc289f9c64c2807b697 100644 (file)
@@ -23,9 +23,9 @@ class EntriesRepository extends EntityRepository
             ->select('e')
             ->setFirstResult($firstResult)
             ->setMaxResults($maxResults)
-            ->where('e.isRead = 0')
+            ->where('e.isArchived = false')
             ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
-            ->andWhere('e.isDeleted=0')
+            ->andWhere('e.isDeleted=false')
             ->orderBy('e.createdAt', 'desc')
             ->getQuery();
 
@@ -48,9 +48,9 @@ class EntriesRepository extends EntityRepository
             ->select('e')
             ->setFirstResult($firstResult)
             ->setMaxResults($maxResults)
-            ->where('e.isRead = 1')
+            ->where('e.isArchived = true')
             ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
-            ->andWhere('e.isDeleted=0')
+            ->andWhere('e.isDeleted=false')
             ->orderBy('e.createdAt', 'desc')
             ->getQuery();
 
@@ -73,9 +73,9 @@ class EntriesRepository extends EntityRepository
             ->select('e')
             ->setFirstResult($firstResult)
             ->setMaxResults($maxResults)
-            ->where('e.isFav = 1')
+            ->where('e.isStarred = true')
             ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
-            ->andWhere('e.isDeleted=0')
+            ->andWhere('e.isDeleted=false')
             ->orderBy('e.createdAt', 'desc')
             ->getQuery();
 
@@ -91,11 +91,11 @@ class EntriesRepository extends EntityRepository
             ->where('e.userId =:userId')->setParameter('userId', $userId);
 
         if (!is_null($isArchived)) {
-            $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived);
+            $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', $isArchived);
         }
 
         if (!is_null($isStarred)) {
-            $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred);
+            $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', $isStarred);
         }
 
         if (!is_null($isDeleted)) {