1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00
This commit is contained in:
Jeremy Benoist 2016-10-08 11:14:09 +02:00
parent ca8b49f46e
commit 8c61fd12b1
No known key found for this signature in database
GPG key ID: BCA73962457ACC3C
4 changed files with 10 additions and 9 deletions

View file

@ -253,7 +253,7 @@ class ConfigController extends Controller
$this->getDoctrine()->getRepository('WallabagAnnotationBundle:Annotation')->removeAllByUserId($this->getUser()->getId());
}
// manually remove tags first to avoid orphan tag
// manually remove tags to avoid orphan tag
$this->removeAllTagsByUserId($this->getUser()->getId());
$this->getDoctrine()
@ -270,9 +270,9 @@ class ConfigController extends Controller
}
/**
* Remove all tags for a given user and cleanup orphan tags
* Remove all tags for a given user and cleanup orphan tags.
*
* @param int $userId
* @param int $userId
*/
private function removeAllTagsByUserId($userId)
{
@ -286,6 +286,7 @@ class ConfigController extends Controller
->getRepository('WallabagCoreBundle:Entry')
->removeTags($userId, $tags);
// cleanup orphan tags
$em = $this->getDoctrine()->getManager();
foreach ($tags as $tag) {