mirror of
https://github.com/wallabag/wallabag.git
synced 2025-09-15 18:57:05 +00:00
CS
This commit is contained in:
parent
ca8b49f46e
commit
8c61fd12b1
4 changed files with 10 additions and 9 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue