From: Nicolas LÅ“uillet Date: Mon, 2 May 2016 19:32:47 +0000 (+0200) Subject: Fix tags listing X-Git-Tag: 2.0.4~12^2~1 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=2a007fe43d937043c2c41b011f98652bd6e138a7;p=github%2Fwallabag%2Fwallabag.git Fix tags listing Fix #1994 * Remove unused method in tag repository --- diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index 16d14d79..8645fb44 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php @@ -81,7 +81,7 @@ class TagController extends Controller { $tags = $this->getDoctrine() ->getRepository('WallabagCoreBundle:Tag') - ->findTags($this->getUser()->getId()); + ->findAllTags($this->getUser()->getId()); return $this->render( 'WallabagCoreBundle:Tag:tags.html.twig', 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. * diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig index dfc61751..bb0ca939 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig @@ -4,7 +4,7 @@ {% block content %}
-
{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}
+
{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}