aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-09 21:13:56 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-04-09 21:13:56 +0200
commit5c3ca4fe9eb1db2fa11c0809c54538430b89b1fc (patch)
tree1740b01e8f7e3573eb2c2c76eb3f49a6c18dadb0 /src/Wallabag/ApiBundle/Controller/WallabagRestController.php
parent015e4284f0628750e5d2ce1de27fafe964286562 (diff)
downloadwallabag-5c3ca4fe9eb1db2fa11c0809c54538430b89b1fc.tar.gz
wallabag-5c3ca4fe9eb1db2fa11c0809c54538430b89b1fc.tar.zst
wallabag-5c3ca4fe9eb1db2fa11c0809c54538430b89b1fc.zip
All the entries are fetched via GET /api/entries
Fix #1863: only the unread entries were fetched with GET /api/entries entrypoint. Now, all the entries are fetched
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/WallabagRestController.php')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 744e1a60..fe3495f8 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -43,8 +43,8 @@ class WallabagRestController extends FOSRestController
43 { 43 {
44 $this->validateAuthentication(); 44 $this->validateAuthentication();
45 45
46 $isArchived = (int) $request->query->get('archive'); 46 $isArchived = (null === $request->query->get('archive')) ? null : (bool) (int) $request->query->get('archive');
47 $isStarred = (int) $request->query->get('starred'); 47 $isStarred = (null === $request->query->get('starred')) ? null : (bool) (int) $request->query->get('starred');
48 $sort = $request->query->get('sort', 'created'); 48 $sort = $request->query->get('sort', 'created');
49 $order = $request->query->get('order', 'desc'); 49 $order = $request->query->get('order', 'desc');
50 $page = (int) $request->query->get('page', 1); 50 $page = (int) $request->query->get('page', 1);
@@ -52,7 +52,7 @@ class WallabagRestController extends FOSRestController
52 52
53 $pager = $this->getDoctrine() 53 $pager = $this->getDoctrine()
54 ->getRepository('WallabagCoreBundle:Entry') 54 ->getRepository('WallabagCoreBundle:Entry')
55 ->findEntries($this->getUser()->getId(), (bool) $isArchived, (bool) $isStarred, $sort, $order); 55 ->findEntries($this->getUser()->getId(), $isArchived, $isStarred, $sort, $order);
56 56
57 $pager->setCurrentPage($page); 57 $pager->setCurrentPage($page);
58 $pager->setMaxPerPage($perPage); 58 $pager->setMaxPerPage($perPage);