aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
authorThomas Citharel <tcit@tcit.fr>2017-02-24 11:27:03 +0100
committerThomas Citharel <tcit@tcit.fr>2017-05-01 13:04:31 +0200
commite2f3800ccb884682547769d9e4b5d6b7cafe4e07 (patch)
treee0aec759b37b66ef795e28c652a94e4fa116e85f /src/Wallabag/CoreBundle/Repository/EntryRepository.php
parent3cbb0cc3ef89873a06bda6583747a2660b989fb8 (diff)
downloadwallabag-e2f3800ccb884682547769d9e4b5d6b7cafe4e07.tar.gz
wallabag-e2f3800ccb884682547769d9e4b5d6b7cafe4e07.tar.zst
wallabag-e2f3800ccb884682547769d9e4b5d6b7cafe4e07.zip
Add Clean Duplicates Command
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 1f22e901..5e7b0d3a 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -379,4 +379,17 @@ class EntryRepository extends EntityRepository
379 ->setParameter('userId', $userId) 379 ->setParameter('userId', $userId)
380 ->execute(); 380 ->execute();
381 } 381 }
382
383 /**
384 * Get id and url from all entries
385 * Used for the clean-duplicates command.
386 */
387 public function getAllEntriesIdAndUrl($userId)
388 {
389 $qb = $this->createQueryBuilder('e')
390 ->select('e.id, e.url')
391 ->where('e.user = :userid')->setParameter(':userid', $userId);
392
393 return $qb->getQuery()->getArrayResult();
394 }
382} 395}