aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Wallabag/CoreBundle/Controller/TagController.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/TagController.php b/src/Wallabag/CoreBundle/Controller/TagController.php
index 56e5195c..f31f4028 100644
--- a/src/Wallabag/CoreBundle/Controller/TagController.php
+++ b/src/Wallabag/CoreBundle/Controller/TagController.php
@@ -32,10 +32,16 @@ class TagController extends Controller
32 $em = $this->getDoctrine()->getManager(); 32 $em = $this->getDoctrine()->getManager();
33 33
34 if (is_null($existingTag)) { 34 if (is_null($existingTag)) {
35 $entry->addTag($tag); 35 $this->get('wallabag_core.content_proxy')->assignTagsToEntry(
36 $entry,
37 $tag
38 );
36 $em->persist($tag); 39 $em->persist($tag);
37 } elseif (!$existingTag->hasEntry($entry)) { 40 } elseif (!$existingTag->hasEntry($entry)) {
38 $entry->addTag($existingTag); 41 $this->get('wallabag_core.content_proxy')->assignTagsToEntry(
42 $entry,
43 $existingTag
44 );
39 $em->persist($existingTag); 45 $em->persist($existingTag);
40 } 46 }
41 47