diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-30 17:15:08 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2020-04-30 17:15:08 +0200 |
commit | 4c8dfe335a27c222fd37e4c2fb3c94d0b0bf8a61 (patch) | |
tree | e7b133496445791a66b59284b258699f09a5b946 /src/Wallabag/CoreBundle/Repository/EntryRepository.php | |
parent | 38f7c4590362e4657402eb1b58ad29b44ec763a6 (diff) | |
download | wallabag-4c8dfe335a27c222fd37e4c2fb3c94d0b0bf8a61.tar.gz wallabag-4c8dfe335a27c222fd37e4c2fb3c94d0b0bf8a61.tar.zst wallabag-4c8dfe335a27c222fd37e4c2fb3c94d0b0bf8a61.zip |
Fixed repository to retrieve articlessame-domain
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Repository/EntryRepository.php | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index f2c73bbf..23d1e37e 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php | |||
@@ -52,14 +52,21 @@ class EntryRepository extends EntityRepository | |||
52 | */ | 52 | */ |
53 | public function getBuilderForSameDomainByUser($userId, $entryId) | 53 | public function getBuilderForSameDomainByUser($userId, $entryId) |
54 | { | 54 | { |
55 | dump($entryId);die; | 55 | $queryBuilder = $this->createQueryBuilder('e'); |
56 | |||
57 | $ | ||
58 | 56 | ||
59 | return $this | 57 | return $this |
60 | ->getSortedQueryBuilderByUser($userId) | 58 | ->getSortedQueryBuilderByUser($userId) |
61 | ->andWhere('e.isArchived = false') | 59 | ->andWhere('e.id <> :entryId')->setParameter('entryId', $entryId) |
62 | ; | 60 | ->andWhere( |
61 | $queryBuilder->expr()->in( | ||
62 | 'e.domainName', | ||
63 | $this | ||
64 | ->createQueryBuilder('e2') | ||
65 | ->select('e2.domainName') | ||
66 | ->where('e2.id = :entryId')->setParameter('entryId', $entryId) | ||
67 | ->getDQL() | ||
68 | ) | ||
69 | ); | ||
63 | } | 70 | } |
64 | 71 | ||
65 | /** | 72 | /** |