From 511f1ce1e87e0f30a455ca6ed73e008bfd557f83 Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Mon, 21 Aug 2017 10:36:56 +0200 Subject: Add reload entry command --- src/Wallabag/CoreBundle/Repository/EntryRepository.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php') diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index d70d6ca6..9a30cd79 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -364,6 +364,23 @@ class EntryRepository extends EntityRepository return $qb->getQuery()->getArrayResult(); } + /** + * @param int $userId + * + * @return array + */ + public function getAllEntriesId($userId = null) + { + $qb = $this->createQueryBuilder('e') + ->select('e.id'); + + if (null !== $userId) { + $qb->where('e.user = :userid')->setParameter(':userid', $userId); + } + + return $qb->getQuery()->getArrayResult(); + } + /** * Find all entries by url and owner. * -- cgit v1.2.3 From 215409a8b2ea3888fc197c8cd7beddda0a9f1403 Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Mon, 21 Aug 2017 18:19:42 +0200 Subject: rename getAllEntriesId into findAllEntriesIdByUserId --- src/Wallabag/CoreBundle/Repository/EntryRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php') diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 9a30cd79..febc86d3 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -369,7 +369,7 @@ class EntryRepository extends EntityRepository * * @return array */ - public function getAllEntriesId($userId = null) + public function findAllEntriesIdByUserId($userId = null) { $qb = $this->createQueryBuilder('e') ->select('e.id'); -- cgit v1.2.3 From dbf1188c5b78b7190cbfce2db00e08d5e69029ff Mon Sep 17 00:00:00 2001 From: Nicolas Hart Date: Tue, 22 Aug 2017 10:42:54 +0200 Subject: rename getAllEntriesIdAndUrl into findAllEntriesIdAndUrlByUserId --- src/Wallabag/CoreBundle/Repository/EntryRepository.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php') diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index febc86d3..eb5e3205 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -355,7 +355,7 @@ class EntryRepository extends EntityRepository * Get id and url from all entries * Used for the clean-duplicates command. */ - public function getAllEntriesIdAndUrl($userId) + public function findAllEntriesIdAndUrlByUserId($userId) { $qb = $this->createQueryBuilder('e') ->select('e.id, e.url') -- cgit v1.2.3