From 2a007fe43d937043c2c41b011f98652bd6e138a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Mon, 2 May 2016 21:32:47 +0200 Subject: Fix tags listing Fix #1994 * Remove unused method in tag repository --- src/Wallabag/CoreBundle/Repository/TagRepository.php | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php') diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index afeb985b..c567317e 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php @@ -3,8 +3,6 @@ namespace Wallabag\CoreBundle\Repository; use Doctrine\ORM\EntityRepository; -use Pagerfanta\Adapter\DoctrineORMAdapter; -use Pagerfanta\Pagerfanta; class TagRepository extends EntityRepository { @@ -22,22 +20,6 @@ class TagRepository extends EntityRepository ->where('e.user = :userId')->setParameter('userId', $userId); } - /** - * Find Tags and return a Pager. - * - * @param int $userId - * - * @return Pagerfanta - */ - public function findTags($userId) - { - $qb = $this->getQbForAllTags($userId); - - $pagerAdapter = new DoctrineORMAdapter($qb); - - return new Pagerfanta($pagerAdapter); - } - /** * Find Tags. * -- cgit v1.2.3 From e9023a16eba20655965b658ce4dbb2229dfe2546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20L=C5=93uillet?= Date: Tue, 3 May 2016 09:39:34 +0200 Subject: Remove useless method --- src/Wallabag/CoreBundle/Repository/TagRepository.php | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php') diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php index c567317e..abf915fe 100644 --- a/src/Wallabag/CoreBundle/Repository/TagRepository.php +++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php @@ -6,20 +6,6 @@ use Doctrine\ORM\EntityRepository; class TagRepository extends EntityRepository { - /** - * Return only the QueryBuilder to retrieve all tags for a given user. - * - * @param int $userId - * - * @return QueryBuilder - */ - private function getQbForAllTags($userId) - { - return $this->createQueryBuilder('t') - ->leftJoin('t.entries', 'e') - ->where('e.user = :userId')->setParameter('userId', $userId); - } - /** * Find Tags. * @@ -29,7 +15,9 @@ class TagRepository extends EntityRepository */ public function findAllTags($userId) { - return $this->getQbForAllTags($userId) + return $this->createQueryBuilder('t') + ->leftJoin('t.entries', 'e') + ->where('e.user = :userId')->setParameter('userId', $userId) ->getQuery() ->getResult(); } -- cgit v1.2.3