aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index d70d6ca6..eb5e3205 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -355,7 +355,7 @@ class EntryRepository extends EntityRepository
355 * Get id and url from all entries 355 * Get id and url from all entries
356 * Used for the clean-duplicates command. 356 * Used for the clean-duplicates command.
357 */ 357 */
358 public function getAllEntriesIdAndUrl($userId) 358 public function findAllEntriesIdAndUrlByUserId($userId)
359 { 359 {
360 $qb = $this->createQueryBuilder('e') 360 $qb = $this->createQueryBuilder('e')
361 ->select('e.id, e.url') 361 ->select('e.id, e.url')
@@ -365,6 +365,23 @@ class EntryRepository extends EntityRepository
365 } 365 }
366 366
367 /** 367 /**
368 * @param int $userId
369 *
370 * @return array
371 */
372 public function findAllEntriesIdByUserId($userId = null)
373 {
374 $qb = $this->createQueryBuilder('e')
375 ->select('e.id');
376
377 if (null !== $userId) {
378 $qb->where('e.user = :userid')->setParameter(':userid', $userId);
379 }
380
381 return $qb->getQuery()->getArrayResult();
382 }
383
384 /**
368 * Find all entries by url and owner. 385 * Find all entries by url and owner.
369 * 386 *
370 * @param $url 387 * @param $url