diff options
Diffstat (limited to 'src/Wallabag/AnnotationBundle')
-rw-r--r-- | src/Wallabag/AnnotationBundle/Controller/WallabagAnnotationController.php | 2 | ||||
-rw-r--r-- | src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php | 4 |
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') |