Simplifed function which does tag cleanup

This commit is contained in:
tcit
2014-05-14 18:51:02 +02:00
parent 4910af33ff
commit 24696800e5
2 changed files with 13 additions and 10 deletions

View File

@ -559,6 +559,7 @@ class Poche
}
}
$this->messages->add('s', _('The tag has been applied successfully'));
Tools::logm('The tag has been applied successfully');
Tools::redirect();
break;
case 'remove_tag' :
@ -571,8 +572,9 @@ class Poche
}
$this->store->removeTagForEntry($id, $tag_id);
Tools::logm('tag entry deleted');
$this->store->cleanUnusedTags();
Tools::logm('old tags cleaned');
if ($this->store->cleanUnusedTag($tag_id)) {
Tools::logm('tag deleted');
}
$this->messages->add('s', _('The tag has been successfully deleted'));
Tools::redirect();
break;