aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r--src/Wallabag/ApiBundle/Controller/WallabagRestController.php18
-rw-r--r--src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php2
-rw-r--r--src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php6
3 files changed, 13 insertions, 13 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
index 692a4ae0..02a6de64 100644
--- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
+++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php
@@ -84,12 +84,12 @@ class WallabagRestController extends Controller
84 public function getEntriesAction(Request $request) 84 public function getEntriesAction(Request $request)
85 { 85 {
86 $isArchived = $request->query->get('archive'); 86 $isArchived = $request->query->get('archive');
87 $isStarred = $request->query->get('star'); 87 $isStarred = $request->query->get('star');
88 $sort = $request->query->get('sort', 'created'); 88 $sort = $request->query->get('sort', 'created');
89 $order = $request->query->get('order', 'desc'); 89 $order = $request->query->get('order', 'desc');
90 $page = (int) $request->query->get('page', 1); 90 $page = (int) $request->query->get('page', 1);
91 $perPage = (int) $request->query->get('perPage', 30); 91 $perPage = (int) $request->query->get('perPage', 30);
92 $tags = $request->query->get('tags', []); 92 $tags = $request->query->get('tags', []);
93 93
94 $pager = $this 94 $pager = $this
95 ->getDoctrine() 95 ->getDoctrine()
@@ -99,7 +99,7 @@ class WallabagRestController extends Controller
99 $pager->setCurrentPage($page); 99 $pager->setCurrentPage($page);
100 $pager->setMaxPerPage($perPage); 100 $pager->setMaxPerPage($perPage);
101 101
102 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage'); 102 $pagerfantaFactory = new PagerfantaFactory('page', 'perPage');
103 $paginatedCollection = $pagerfantaFactory->createRepresentation( 103 $paginatedCollection = $pagerfantaFactory->createRepresentation(
104 $pager, 104 $pager,
105 new Route('api_get_entries', [], $absolute = true) 105 new Route('api_get_entries', [], $absolute = true)
@@ -188,9 +188,9 @@ class WallabagRestController extends Controller
188 { 188 {
189 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId()); 189 $this->validateUserAccess($entry->getUser()->getId(), $this->getUser()->getId());
190 190
191 $title = $request->request->get('title'); 191 $title = $request->request->get('title');
192 $isArchived = $request->request->get('is_archived'); 192 $isArchived = $request->request->get('is_archived');
193 $isStarred = $request->request->get('is_starred'); 193 $isStarred = $request->request->get('is_starred');
194 194
195 if (!is_null($title)) { 195 if (!is_null($title)) {
196 $entry->setTitle($title); 196 $entry->setTitle($title);
diff --git a/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php
index db73ae2a..9bf8b377 100644
--- a/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php
+++ b/src/Wallabag/ApiBundle/Security/Authentication/Provider/WsseProvider.php
@@ -17,7 +17,7 @@ class WsseProvider implements AuthenticationProviderInterface
17 public function __construct(UserProviderInterface $userProvider, $cacheDir) 17 public function __construct(UserProviderInterface $userProvider, $cacheDir)
18 { 18 {
19 $this->userProvider = $userProvider; 19 $this->userProvider = $userProvider;
20 $this->cacheDir = $cacheDir; 20 $this->cacheDir = $cacheDir;
21 21
22 // If cache directory does not exist we create it 22 // If cache directory does not exist we create it
23 if (!is_dir($this->cacheDir)) { 23 if (!is_dir($this->cacheDir)) {
diff --git a/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php
index 50587837..2fcbe014 100644
--- a/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php
+++ b/src/Wallabag/ApiBundle/Security/Firewall/WsseListener.php
@@ -36,9 +36,9 @@ class WsseListener implements ListenerInterface
36 $token = new WsseUserToken(); 36 $token = new WsseUserToken();
37 $token->setUser($matches[1]); 37 $token->setUser($matches[1]);
38 38
39 $token->digest = $matches[2]; 39 $token->digest = $matches[2];
40 $token->nonce = $matches[3]; 40 $token->nonce = $matches[3];
41 $token->created = $matches[4]; 41 $token->created = $matches[4];
42 42
43 try { 43 try {
44 $authToken = $this->authenticationManager->authenticate($token); 44 $authToken = $this->authenticationManager->authenticate($token);