diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ConfigController.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Controller/ConfigController.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/ConfigController.php b/src/Wallabag/CoreBundle/Controller/ConfigController.php index e2484064..8d391917 100644 --- a/src/Wallabag/CoreBundle/Controller/ConfigController.php +++ b/src/Wallabag/CoreBundle/Controller/ConfigController.php | |||
@@ -253,7 +253,7 @@ class ConfigController extends Controller | |||
253 | $this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->removeAllByUserId($this->getUser()->getId()); | 253 | $this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->removeAllByUserId($this->getUser()->getId()); |
254 | } | 254 | } |
255 | 255 | ||
256 | // manually remove tags first to avoid orphan tag | 256 | // manually remove tags to avoid orphan tag |
257 | $this->removeAllTagsByUserId($this->getUser()->getId()); | 257 | $this->removeAllTagsByUserId($this->getUser()->getId()); |
258 | 258 | ||
259 | $this->getDoctrine() | 259 | $this->getDoctrine() |
@@ -270,9 +270,9 @@ class ConfigController extends Controller | |||
270 | } | 270 | } |
271 | 271 | ||
272 | /** | 272 | /** |
273 | * Remove all tags for a given user and cleanup orphan tags | 273 | * Remove all tags for a given user and cleanup orphan tags. |
274 | * | 274 | * |
275 | * @param int $userId | 275 | * @param int $userId |
276 | */ | 276 | */ |
277 | private function removeAllTagsByUserId($userId) | 277 | private function removeAllTagsByUserId($userId) |
278 | { | 278 | { |
@@ -286,6 +286,7 @@ class ConfigController extends Controller | |||
286 | ->getRepository('WallabagCoreBundle:Entry') | 286 | ->getRepository('WallabagCoreBundle:Entry') |
287 | ->removeTags($userId, $tags); | 287 | ->removeTags($userId, $tags); |
288 | 288 | ||
289 | // cleanup orphan tags | ||
289 | $em = $this->getDoctrine()->getManager(); | 290 | $em = $this->getDoctrine()->getManager(); |
290 | 291 | ||
291 | foreach ($tags as $tag) { | 292 | foreach ($tags as $tag) { |