diff options
Diffstat (limited to 'application/api/controllers/Tags.php')
-rw-r--r-- | application/api/controllers/Tags.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/application/api/controllers/Tags.php b/application/api/controllers/Tags.php index e60e00a7..5a23f6db 100644 --- a/application/api/controllers/Tags.php +++ b/application/api/controllers/Tags.php | |||
@@ -122,12 +122,12 @@ class Tags extends ApiController | |||
122 | throw new ApiBadParametersException('New tag name is required in the request body'); | 122 | throw new ApiBadParametersException('New tag name is required in the request body'); |
123 | } | 123 | } |
124 | 124 | ||
125 | $bookmarks = $this->bookmarkService->search( | 125 | $searchResult = $this->bookmarkService->search( |
126 | ['searchtags' => $args['tagName']], | 126 | ['searchtags' => $args['tagName']], |
127 | BookmarkFilter::$ALL, | 127 | BookmarkFilter::$ALL, |
128 | true | 128 | true |
129 | ); | 129 | ); |
130 | foreach ($bookmarks as $bookmark) { | 130 | foreach ($searchResult->getBookmarks() as $bookmark) { |
131 | $bookmark->renameTag($args['tagName'], $data['name']); | 131 | $bookmark->renameTag($args['tagName'], $data['name']); |
132 | $this->bookmarkService->set($bookmark, false); | 132 | $this->bookmarkService->set($bookmark, false); |
133 | $this->history->updateLink($bookmark); | 133 | $this->history->updateLink($bookmark); |
@@ -157,12 +157,12 @@ class Tags extends ApiController | |||
157 | throw new ApiTagNotFoundException(); | 157 | throw new ApiTagNotFoundException(); |
158 | } | 158 | } |
159 | 159 | ||
160 | $bookmarks = $this->bookmarkService->search( | 160 | $searchResult = $this->bookmarkService->search( |
161 | ['searchtags' => $args['tagName']], | 161 | ['searchtags' => $args['tagName']], |
162 | BookmarkFilter::$ALL, | 162 | BookmarkFilter::$ALL, |
163 | true | 163 | true |
164 | ); | 164 | ); |
165 | foreach ($bookmarks as $bookmark) { | 165 | foreach ($searchResult->getBookmarks() as $bookmark) { |
166 | $bookmark->deleteTag($args['tagName']); | 166 | $bookmark->deleteTag($args['tagName']); |
167 | $this->bookmarkService->set($bookmark, false); | 167 | $this->bookmarkService->set($bookmark, false); |
168 | $this->history->updateLink($bookmark); | 168 | $this->history->updateLink($bookmark); |