]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Controller/EntryController.php
Links on each tag in Tags view
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Controller / EntryController.php
index ccdf940669bde3d5aa00073256c5607e8ba1805c..93db0d6caa117d1d0ba9442c8b4a3ea66ace11c8 100644 (file)
@@ -4,7 +4,6 @@ namespace Wallabag\CoreBundle\Controller;
 
 use Pagerfanta\Adapter\DoctrineORMAdapter;
 use Pagerfanta\Exception\OutOfRangeCurrentPageException;
-use Pagerfanta\Pagerfanta;
 use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
 use Symfony\Bundle\FrameworkBundle\Controller\Controller;
 use Symfony\Component\HttpFoundation\Request;
@@ -257,9 +256,10 @@ class EntryController extends Controller
         }
 
         $pagerAdapter = new DoctrineORMAdapter($qb->getQuery());
-        $entries = new Pagerfanta($pagerAdapter);
 
-        $entries->setMaxPerPage($this->getUser()->getConfig()->getItemsPerPage());
+        $entries = $this->get('wallabag_core.helper.prepare_pager_for_entries')
+            ->prepare($pagerAdapter, $page);
+
         try {
             $entries->setCurrentPage($page);
         } catch (OutOfRangeCurrentPageException $e) {