aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2018-09-07 13:46:30 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2018-09-07 13:46:30 +0200
commit7083c0a21d27e7e1bf45a9807a76844116d61fb8 (patch)
treeb72b5a0516d9114aeeccd6ecdb055ee240bda66a /src/Wallabag/AnnotationBundle
parent44043ebe82a22470e2514d05efac324035ee809a (diff)
parent495f83c92539444bff7dfd6cd647b7d65a74f949 (diff)
downloadwallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.gz
wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.tar.zst
wallabag-7083c0a21d27e7e1bf45a9807a76844116d61fb8.zip
Merge remote-tracking branch 'origin/master' into 2.4
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r--src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php2
-rw-r--r--src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
index f3090e65..3a7421c7 100644
--- a/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
+++ b/src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php
@@ -28,7 +28,7 @@ class WallabagAnnotationController extends FOSRestController
28 ->getDoctrine() 28 ->getDoctrine()
29 ->getRepository('WallabagAnnotationBundle:Annotation') 29 ->getRepository('WallabagAnnotationBundle:Annotation')
30 ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId()); 30 ->findAnnotationsByPageId($entry->getId(), $this->getUser()->getId());
31 $total = count($annotationRows); 31 $total = \count($annotationRows);
32 $annotations = ['total' => $total, 'rows' => $annotationRows]; 32 $annotations = ['total' => $total, 'rows' => $annotationRows];
33 33
34 $json = $this->get('jms_serializer')->serialize($annotations, 'json'); 34 $json = $this->get('jms_serializer')->serialize($annotations, 'json');
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
index b44f7e64..0de5c934 100644
--- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
+++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
@@ -21,7 +21,7 @@ class AnnotationRepository extends EntityRepository
21 public function getBuilderForAllByUser($userId) 21 public function getBuilderForAllByUser($userId)
22 { 22 {
23 return $this 23 return $this
24 ->getBuilderByUser($userId) 24 ->getSortedQueryBuilderByUser($userId)
25 ; 25 ;
26 } 26 }
27 27
@@ -133,7 +133,7 @@ class AnnotationRepository extends EntityRepository
133 * 133 *
134 * @return QueryBuilder 134 * @return QueryBuilder
135 */ 135 */
136 private function getBuilderByUser($userId) 136 private function getSortedQueryBuilderByUser($userId)
137 { 137 {
138 return $this->createQueryBuilder('a') 138 return $this->createQueryBuilder('a')
139 ->leftJoin('a.user', 'u') 139 ->leftJoin('a.user', 'u')