aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Controller/ConfigController.php
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-10-08 11:14:09 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2016-10-22 13:13:07 +0200
commit8c61fd12b1df50d481e9f82c39521cca7b8ad060 (patch)
tree877e849dda40dd7652ef650b1255c370c0627066 /src/Wallabag/CoreBundle/Controller/ConfigController.php
parentca8b49f46e9e45875ef0f9dc88a8315489152e82 (diff)
downloadwallabag-8c61fd12b1df50d481e9f82c39521cca7b8ad060.tar.gz
wallabag-8c61fd12b1df50d481e9f82c39521cca7b8ad060.tar.zst
wallabag-8c61fd12b1df50d481e9f82c39521cca7b8ad060.zip
CS
Diffstat (limited to 'src/Wallabag/CoreBundle/Controller/ConfigController.php')
-rw-r--r--src/Wallabag/CoreBundle/Controller/ConfigController.php7
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) {