Fix tags listing

Fix #1994
* Remove unused method in tag repository
This commit is contained in:
Nicolas Lœuillet 2016-05-02 21:32:47 +02:00
parent ba9fee0855
commit 2a007fe43d
No known key found for this signature in database
GPG key ID: 5656BE27E1E34D0A
4 changed files with 3 additions and 21 deletions

View 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',

View 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.
*

View 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>

View 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">