diff options
author | Jeremy <j0k3r@users.noreply.github.com> | 2015-02-06 09:55:16 +0100 |
---|---|---|
committer | Jeremy <j0k3r@users.noreply.github.com> | 2015-02-06 09:55:16 +0100 |
commit | 29c4517f7a8ed08239e5bee3d6c3fa823a83d102 (patch) | |
tree | 5d5bd15db7ae19994da55574ade821acdc115c36 /src/Wallabag/CoreBundle/Repository | |
parent | c8dee953961964aa842e516995f0c6fafd007f9b (diff) | |
parent | be463487cc195026b11e92f1d6d6276f5851b97e (diff) | |
download | wallabag-29c4517f7a8ed08239e5bee3d6c3fa823a83d102.tar.gz wallabag-29c4517f7a8ed08239e5bee3d6c3fa823a83d102.tar.zst wallabag-29c4517f7a8ed08239e5bee3d6c3fa823a83d102.zip |
Merge pull request #1059 from wallabag/rename-entry
Rename entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php (renamed from src/Wallabag/CoreBundle/Repository/EntriesRepository.php) | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index ae854e5a..f4c803f9 100644 --- a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -5,9 +5,8 @@ namespace Wallabag\CoreBundle\Repository; | |||
5 | use Doctrine\ORM\Query; | 5 | use Doctrine\ORM\Query; |
6 | use Doctrine\ORM\EntityRepository; | 6 | use Doctrine\ORM\EntityRepository; |
7 | use Doctrine\ORM\Tools\Pagination\Paginator; | 7 | use Doctrine\ORM\Tools\Pagination\Paginator; |
8 | use Wallabag\CoreBundle\Entity\Entries; | ||
9 | 8 | ||
10 | class EntriesRepository extends EntityRepository | 9 | class EntryRepository extends EntityRepository |
11 | { | 10 | { |
12 | /** | 11 | /** |
13 | * Retrieves unread entries for a user | 12 | * Retrieves unread entries for a user |
@@ -23,9 +22,9 @@ class EntriesRepository extends EntityRepository | |||
23 | ->select('e') | 22 | ->select('e') |
24 | ->setFirstResult($firstResult) | 23 | ->setFirstResult($firstResult) |
25 | ->setMaxResults($maxResults) | 24 | ->setMaxResults($maxResults) |
26 | ->where('e.isRead = 0') | 25 | ->where('e.isArchived = false') |
27 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) | 26 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) |
28 | ->andWhere('e.isDeleted=0') | 27 | ->andWhere('e.isDeleted=false') |
29 | ->orderBy('e.createdAt', 'desc') | 28 | ->orderBy('e.createdAt', 'desc') |
30 | ->getQuery(); | 29 | ->getQuery(); |
31 | 30 | ||
@@ -48,9 +47,9 @@ class EntriesRepository extends EntityRepository | |||
48 | ->select('e') | 47 | ->select('e') |
49 | ->setFirstResult($firstResult) | 48 | ->setFirstResult($firstResult) |
50 | ->setMaxResults($maxResults) | 49 | ->setMaxResults($maxResults) |
51 | ->where('e.isRead = 1') | 50 | ->where('e.isArchived = true') |
52 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) | 51 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) |
53 | ->andWhere('e.isDeleted=0') | 52 | ->andWhere('e.isDeleted=false') |
54 | ->orderBy('e.createdAt', 'desc') | 53 | ->orderBy('e.createdAt', 'desc') |
55 | ->getQuery(); | 54 | ->getQuery(); |
56 | 55 | ||
@@ -73,9 +72,9 @@ class EntriesRepository extends EntityRepository | |||
73 | ->select('e') | 72 | ->select('e') |
74 | ->setFirstResult($firstResult) | 73 | ->setFirstResult($firstResult) |
75 | ->setMaxResults($maxResults) | 74 | ->setMaxResults($maxResults) |
76 | ->where('e.isFav = 1') | 75 | ->where('e.isStarred = true') |
77 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) | 76 | ->andWhere('e.userId =:userId')->setParameter('userId', $userId) |
78 | ->andWhere('e.isDeleted=0') | 77 | ->andWhere('e.isDeleted=false') |
79 | ->orderBy('e.createdAt', 'desc') | 78 | ->orderBy('e.createdAt', 'desc') |
80 | ->getQuery(); | 79 | ->getQuery(); |
81 | 80 | ||
@@ -91,11 +90,11 @@ class EntriesRepository extends EntityRepository | |||
91 | ->where('e.userId =:userId')->setParameter('userId', $userId); | 90 | ->where('e.userId =:userId')->setParameter('userId', $userId); |
92 | 91 | ||
93 | if (!is_null($isArchived)) { | 92 | if (!is_null($isArchived)) { |
94 | $qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived); | 93 | $qb->andWhere('e.isArchived =:isArchived')->setParameter('isArchived', $isArchived); |
95 | } | 94 | } |
96 | 95 | ||
97 | if (!is_null($isStarred)) { | 96 | if (!is_null($isStarred)) { |
98 | $qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred); | 97 | $qb->andWhere('e.isStarred =:isStarred')->setParameter('isStarred', $isStarred); |
99 | } | 98 | } |
100 | 99 | ||
101 | if (!is_null($isDeleted)) { | 100 | if (!is_null($isDeleted)) { |