Fixes #3807. Drops the TagScript module entirely and replaces it with a simple call to Post.tag. Simultaneously fixes #3773 as a consequence of removing TagScript.run. Post.update already updates data-tags by itself, so there was no need for TagScript.run to update data-tags as well.
This commit is contained in:
@@ -535,6 +535,11 @@ Post.vote = function(score, id) {
|
||||
});
|
||||
}
|
||||
|
||||
Post.tag = function(post_id, tags) {
|
||||
const tag_string = (Array.isArray(tags) ? tags.join(" ") : String(tags));
|
||||
Post.update(post_id, { "post[old_tag_string]": "", "post[tag_string]": tag_string });
|
||||
}
|
||||
|
||||
Post.update = function(post_id, params) {
|
||||
Post.notice_update("inc");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user