]> git.immae.eu Git - github/wallabag/wallabag.git/commitdiff
Fix tags listing
authorNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 2 May 2016 19:32:47 +0000 (21:32 +0200)
committerNicolas Lœuillet <nicolas@loeuillet.org>
Mon, 2 May 2016 19:32:47 +0000 (21:32 +0200)
Fix #1994
* Remove unused method in tag repository

src/Wallabag/CoreBundle/Controller/TagController.php
src/Wallabag/CoreBundle/Repository/TagRepository.php
src/Wallabag/CoreBundle/Resources/views/themes/baggy/Tag/tags.html.twig
src/Wallabag/CoreBundle/Resources/views/themes/material/Tag/tags.html.twig

index 16d14d7974059aa9fa9d9e2966315cad7f3845ee..8645fb442621b933a10df0d127c5919b4cecd3d6 100644 (file)
@@ -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',
index afeb985b30c272c9b9f76d84540b15eaf230f172..c567317e0c3b3b9291a8d3d6db127ab4be0f6099 100644 (file)
@@ -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.
      *
index dfc6175132e217440f9211d0d9b64871dc377e49..bb0ca93974021cae14b29a12887ecb457c665b0c 100644 (file)
@@ -4,7 +4,7 @@
 
 {% block content %}
     <div class="results">
-        <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+        <div class="nb-results">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
     </div>
 
     <ul>
index 6b58368924663e51f078be35c375473200649b5c..6fd263d8efd43d5ea72ffa22d69c8a9b22733fa9 100644 (file)
@@ -4,7 +4,7 @@
 
 {% block content %}
     <div class="results clearfix">
-        <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags.count) }}</div>
+        <div class="nb-results left">{{ 'tag.list.number_on_the_page'|transchoice(tags|length) }}</div>
     </div>
     <br />
     <ul class="row data">