aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php2
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php7
2 files changed, 5 insertions, 4 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index bd50de7f..91f34b3d 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -88,7 +88,7 @@ class TagController extends Controller
88 $tags = $this->get('wallabag_core.tag_repository') 88 $tags = $this->get('wallabag_core.tag_repository')
89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId()); 89 ->findAllFlatTagsWithNbEntries($this->getUser()->getId());
90 $untagged = $this->get('wallabag_core.entry_repository') 90 $untagged = $this->get('wallabag_core.entry_repository')
91 ->countUntaggedEntriesForUser($this->getUser()->getId()); 91 ->countUntaggedEntriesByUser($this->getUser()->getId());
92 92
93 $renameForms = []; 93 $renameForms = [];
94 foreach ($tags as $tag) { 94 foreach ($tags as $tag) {
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 77d88c9c..d9675982 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -131,15 +131,16 @@ class EntryRepository extends EntityRepository
131 131
132 /** 132 /**
133 * Retrieve the number of untagged entries for a user. 133 * Retrieve the number of untagged entries for a user.
134 * 134 *
135 * @param int $userId 135 * @param int $userId
136 * 136 *
137 * @return int 137 * @return int
138 */ 138 */
139 public function countUntaggedEntriesByUser($userId) 139 public function countUntaggedEntriesByUser($userId)
140 { 140 {
141 return $this->getRawBuilderForUntaggedByUser($userId) 141 return (int) $this->getRawBuilderForUntaggedByUser($userId)
142 ->select('count(e.id)') 142 ->select('count(e.id)')
143 ->getQuery()
143 ->getSingleScalarResult(); 144 ->getSingleScalarResult();
144 } 145 }
145 146