diff options
Diffstat (limited to 'src/Wallabag')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/TagController.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php index a6ad131f..c228c27a 100644 --- a/src/Wallabag/CoreBundle/Controller/TagController.php +++ b/src/Wallabag/CoreBundle/Controller/TagController.php | |||
@@ -152,6 +152,10 @@ class TagController extends Controller | |||
152 | $form->handleRequest($request); | 152 | $form->handleRequest($request); |
153 | 153 | ||
154 | if ($form->isSubmitted() && $form->isValid()) { | 154 | if ($form->isSubmitted() && $form->isValid()) { |
155 | $newTagLabel = $form->get('label')->getData(); | ||
156 | $newTag = new Tag(); | ||
157 | $newTag->setLabel($newTagLabel); | ||
158 | |||
155 | $entries = $this->get('wallabag_core.entry_repository')->findAllByTagId( | 159 | $entries = $this->get('wallabag_core.entry_repository')->findAllByTagId( |
156 | $this->getUser()->getId(), | 160 | $this->getUser()->getId(), |
157 | $tag->getId() | 161 | $tag->getId() |
@@ -159,7 +163,8 @@ class TagController extends Controller | |||
159 | foreach ($entries as $entry) { | 163 | foreach ($entries as $entry) { |
160 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry( | 164 | $this->get('wallabag_core.tags_assigner')->assignTagsToEntry( |
161 | $entry, | 165 | $entry, |
162 | $form->get('label')->getData() | 166 | $newTagLabel, |
167 | [$newTag] | ||
163 | ); | 168 | ); |
164 | $entry->removeTag($tag); | 169 | $entry->removeTag($tag); |
165 | } | 170 | } |