Added unused tag purging in post tag edit jobs
This commit is contained in:
parent
425517f0ae
commit
c3a20ad721
2 changed files with 2 additions and 0 deletions
|
@ -11,6 +11,7 @@ class EditPostTagsJob extends AbstractPostJob
|
|||
$newTags = array_map(function($tag) { return $tag->name; }, $post->getTags());
|
||||
|
||||
PostModel::save($post);
|
||||
TagModel::removeUnused();
|
||||
|
||||
foreach (array_diff($oldTags, $newTags) as $tag)
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@ class TogglePostTagJob extends AbstractPostJob
|
|||
|
||||
$post->setTags($tags);
|
||||
PostModel::save($post);
|
||||
TagModel::removeUnused();
|
||||
|
||||
if ($enable)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue