aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php19
1 files changed, 16 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 749d2338..a31f97b5 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -102,7 +102,7 @@ class EntryRepository extends EntityRepository
102 } 102 }
103 103
104 /** 104 /**
105 * Retrieves untagged entries for a user. 105 * Retrieve a sorted list of untagged entries for a user.
106 * 106 *
107 * @param int $userId 107 * @param int $userId
108 * 108 *
@@ -111,8 +111,21 @@ class EntryRepository extends EntityRepository
111 public function getBuilderForUntaggedByUser($userId) 111 public function getBuilderForUntaggedByUser($userId)
112 { 112 {
113 return $this 113 return $this
114 ->getSortedQueryBuilderByUser($userId) 114 ->sortQueryBuilder($this->getRawBuilderForUntaggedByUser($userId));
115 ->andWhere('size(e.tags) = 0'); 115 }
116
117 /**
118 * Retrieve untagged entries for a user.
119 *
120 * @param int $userId
121 *
122 * @return QueryBuilder
123 */
124 public function getRawBuilderForUntaggedByUser($userId)
125 {
126 return $this->getQueryBuilderByUser($userId)
127 ->leftJoin('e.tags', 't')
128 ->andWhere('t.id is null');
116 } 129 }
117 130
118 /** 131 /**