diff --git a/src/Wallabag/CoreBundle/Controller/EntryController.php b/src/Wallabag/CoreBundle/Controller/EntryController.php index ff6f564eb..b03f49eda 100644 --- a/src/Wallabag/CoreBundle/Controller/EntryController.php +++ b/src/Wallabag/CoreBundle/Controller/EntryController.php @@ -319,7 +319,7 @@ class EntryController extends Controller $this->get('lexik_form_filter.query_builder_updater')->addFilterConditions($form, $qb); } - $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); + $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries') ->prepare($pagerAdapter, $page); diff --git a/src/Wallabag/CoreBundle/Controller/RssController.php b/src/Wallabag/CoreBundle/Controller/RssController.php index 2290386f5..92f187075 100644 --- a/src/Wallabag/CoreBundle/Controller/RssController.php +++ b/src/Wallabag/CoreBundle/Controller/RssController.php @@ -85,7 +85,7 @@ class RssController extends Controller throw new \InvalidArgumentException(sprintf('Type "%s" is not implemented.', $type)); } - $pagerAdapter = new DoctrineORMAdapter($qb->getQuery()); + $pagerAdapter = new DoctrineORMAdapter($qb->getQuery(), true, false); $entries = new Pagerfanta($pagerAdapter); $perPage = $user->getConfig()->getRssLimit() ?: $this->getParameter('wallabag_core.rss_limit'); diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php index 553ad6aba..b9532fa25 100644 --- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php @@ -125,9 +125,7 @@ class EntryRepository extends EntityRepository { return $this ->getBuilderByUser($userId) - ->leftJoin('e.tags', 't') - ->groupBy('e.id') - ->having('count(t.id) = 0'); + ->andWhere('size(e.tags) = 0'); } /** @@ -173,7 +171,7 @@ class EntryRepository extends EntityRepository $qb->orderBy('e.updatedAt', $order); } - $pagerAdapter = new DoctrineORMAdapter($qb); + $pagerAdapter = new DoctrineORMAdapter($qb, true, false); return new Pagerfanta($pagerAdapter); }