diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-25 11:21:13 +0200 |
---|---|---|
committer | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-09-25 12:03:49 +0200 |
commit | faa86e06ba3032fdb98f3c0f79c72e8581d3c96f (patch) | |
tree | fbb850231bcdf3e24445c3e73499114e6f30f49c /src/Wallabag/CoreBundle/Controller | |
parent | 9d7dd6b0d2480d3efff5b0ab1461f2ef99bfd57a (diff) | |
download | wallabag-faa86e06ba3032fdb98f3c0f79c72e8581d3c96f.tar.gz wallabag-faa86e06ba3032fdb98f3c0f79c72e8581d3c96f.tar.zst wallabag-faa86e06ba3032fdb98f3c0f79c72e8581d3c96f.zip |
Fix tags count in menu
Move enable cache for Tag in the Entity because function `find*` should return result and not a Query
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index bc95a4d3..07cd3edb 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -84,16 +84,11 @@ class TagController extends Controller | |||
84 | { | 84 | { |
85 | $tags = $this->getDoctrine() | 85 | $tags = $this->getDoctrine() |
86 | ->getRepository('WallabagCoreBundle:Tag') | 86 | ->getRepository('WallabagCoreBundle:Tag') |
87 | ->findAllTags($this->getUser()->getId()) | 87 | ->findAllTagsWithEntries($this->getUser()->getId()); |
88 | ->getQuery() | 88 | |
89 | ->getResult(); | 89 | return $this->render('WallabagCoreBundle:Tag:tags.html.twig', [ |
90 | 90 | 'tags' => $tags, | |
91 | return $this->render( | 91 | ]); |
92 | 'WallabagCoreBundle:Tag:tags.html.twig', | ||
93 | [ | ||
94 | 'tags' => $tags, | ||
95 | ] | ||
96 | ); | ||
97 | } | 92 | } |
98 | 93 | ||
99 | /** | 94 | /** |
@@ -127,13 +122,10 @@ class TagController extends Controller | |||
127 | } | 122 | } |
128 | } | 123 | } |
129 | 124 | ||
130 | return $this->render( | 125 | return $this->render('WallabagCoreBundle:Entry:entries.html.twig',[ |
131 | 'WallabagCoreBundle:Entry:entries.html.twig', | 126 | 'form' => null, |
132 | [ | 127 | 'entries' => $entries, |
133 | 'form' => null, | 128 | 'currentPage' => $page, |
134 | 'entries' => $entries, | 129 | ]); |
135 | 'currentPage' => $page, | ||
136 | ] | ||
137 | ); | ||
138 | } | 130 | } |
139 | } | 131 | } |