aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-09-04 20:53:28 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-09-04 20:53:28 +0200
commit429d86f388da856c9d8d9a649147c5212bee4258 (patch)
tree2dde16adfb069d26209a0c01c92a04eb9b502e54 /src/Wallabag/CoreBundle/Repository
parentc3b53188d75a01e92f2be7204fc961a7636a1827 (diff)
downloadwallabag-429d86f388da856c9d8d9a649147c5212bee4258.tar.gz
wallabag-429d86f388da856c9d8d9a649147c5212bee4258.tar.zst
wallabag-429d86f388da856c9d8d9a649147c5212bee4258.zip
Added tags counter in sidebar (material theme)
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php21
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php4
2 files changed, 1 insertions, 24 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 24d1a57a..719803a1 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -311,25 +311,4 @@ class EntryRepository extends EntityRepository
311 311
312 return $qb->getQuery()->getSingleScalarResult(); 312 return $qb->getQuery()->getSingleScalarResult();
313 } 313 }
314
315 public function setLifeTime($lifeTime)
316 {
317 $this->lifeTime = $lifeTime;
318 }
319
320 /**
321 * Enable cache for a query.
322 *
323 * @param Query $query
324 *
325 * @return Query
326 */
327 public function enableCache(Query $query)
328 {
329 $query->useQueryCache(true);
330 $query->useResultCache(true);
331 $query->setResultCacheLifetime($this->lifeTime);
332
333 return $query;
334 }
335} 314}
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index abf915fe..41f61607 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -17,9 +17,7 @@ class TagRepository extends EntityRepository
17 { 17 {
18 return $this->createQueryBuilder('t') 18 return $this->createQueryBuilder('t')
19 ->leftJoin('t.entries', 'e') 19 ->leftJoin('t.entries', 'e')
20 ->where('e.user = :userId')->setParameter('userId', $userId) 20 ->where('e.user = :userId')->setParameter('userId', $userId);
21 ->getQuery()
22 ->getResult();
23 } 21 }
24 22
25 /** 23 /**