diff options
author | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-05-19 07:39:30 +0200 |
---|---|---|
committer | Jeremy Benoist <j0k3r@users.noreply.github.com> | 2016-05-19 07:39:30 +0200 |
commit | e7658cb00993fc24bddef26b6373197bd4503c99 (patch) | |
tree | 4885fba147b8835fd51e0dc65596dd56ee150322 /src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |
parent | d30ec39008945cdbb98bf5db10640f2fe60d91db (diff) | |
parent | bba271e619eabbd525d38d125e4b77f838cadba5 (diff) | |
download | wallabag-e7658cb00993fc24bddef26b6373197bd4503c99.tar.gz wallabag-e7658cb00993fc24bddef26b6373197bd4503c99.tar.zst wallabag-e7658cb00993fc24bddef26b6373197bd4503c99.zip |
Merge pull request #2092 from Rurik19/issue2089
Starred and Archived clears if article is already exists
Diffstat (limited to 'src/Wallabag/ApiBundle/Controller/WallabagRestController.php')
-rw-r--r-- | src/Wallabag/ApiBundle/Controller/WallabagRestController.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php index 5202c524..af24e498 100644 --- a/src/Wallabag/ApiBundle/Controller/WallabagRestController.php +++ b/src/Wallabag/ApiBundle/Controller/WallabagRestController.php | |||
@@ -110,8 +110,8 @@ class WallabagRestController extends FOSRestController | |||
110 | 110 | ||
111 | $url = $request->request->get('url'); | 111 | $url = $request->request->get('url'); |
112 | $title = $request->request->get('title'); | 112 | $title = $request->request->get('title'); |
113 | $isArchived = (int) $request->request->get('archive'); | 113 | $isArchived = $request->request->get('archive'); |
114 | $isStarred = (int) $request->request->get('starred'); | 114 | $isStarred = $request->request->get('starred'); |
115 | 115 | ||
116 | $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId()); | 116 | $entry = $this->get('wallabag_core.entry_repository')->findByUrlAndUserId($url, $this->getUser()->getId()); |
117 | 117 | ||
@@ -172,8 +172,8 @@ class WallabagRestController extends FOSRestController | |||
172 | $this->validateUserAccess($entry->getUser()->getId()); | 172 | $this->validateUserAccess($entry->getUser()->getId()); |
173 | 173 | ||
174 | $title = $request->request->get('title'); | 174 | $title = $request->request->get('title'); |
175 | $isArchived = (int) $request->request->get('archive'); | 175 | $isArchived = $request->request->get('archive'); |
176 | $isStarred = (int) $request->request->get('starred'); | 176 | $isStarred = $request->request->get('starred'); |
177 | 177 | ||
178 | if (!is_null($title)) { | 178 | if (!is_null($title)) { |
179 | $entry->setTitle($title); | 179 | $entry->setTitle($title); |