aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Controller/ExportController.php2
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php17
2 files changed, 13 insertions, 6 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ExportController.php b/src/Wallabag/CoreBundle/Controller/ExportController.php
index cec8d499..824d21bb 100644
--- a/src/Wallabag/CoreBundle/Controller/ExportController.php
+++ b/src/Wallabag/CoreBundle/Controller/ExportController.php
@@ -47,7 +47,7 @@ class ExportController extends Controller
47 * 47 *
48 * @Route("/export/{category}.{format}", name="export_entries", requirements={ 48 * @Route("/export/{category}.{format}", name="export_entries", requirements={
49 * "format": "epub|mobi|pdf|json|xml|txt|csv", 49 * "format": "epub|mobi|pdf|json|xml|txt|csv",
50 * "category": "all|unread|starred|archive|tag_entries|untagged|search" 50 * "category": "all|unread|starred|archive|tag_entries|untagged|search|same_domain"
51 * }) 51 * })
52 * 52 *
53 * @return \Symfony\Component\HttpFoundation\Response 53 * @return \Symfony\Component\HttpFoundation\Response
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 /**