This commit is contained in:
Jeremy Benoist 2017-06-18 14:58:50 +02:00
parent 8c59809432
commit ebf2d92327
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C

View file

@ -56,17 +56,17 @@ class ExportController extends Controller
{ {
$method = ucfirst($category); $method = ucfirst($category);
$methodBuilder = 'getBuilderFor'.$method.'ByUser'; $methodBuilder = 'getBuilderFor'.$method.'ByUser';
$epository = $this->get('wallabag_core.entry_repository'); $repository = $this->get('wallabag_core.entry_repository');
if ($category == 'tag_entries') { if ($category == 'tag_entries') {
$tag = $this->get('wallabag_core.tag_repository')->findOneBySlug($request->query->get('tag')); $tag = $this->get('wallabag_core.tag_repository')->findOneBySlug($request->query->get('tag'));
$entries = $epository->findAllByTagId( $entries = $repository->findAllByTagId(
$this->getUser()->getId(), $this->getUser()->getId(),
$tag->getId() $tag->getId()
); );
} else { } else {
$entries = $epository $entries = $repository
->$methodBuilder($this->getUser()->getId()) ->$methodBuilder($this->getUser()->getId())
->getQuery() ->getQuery()
->getResult(); ->getResult();