related tags: refactor to take PostQuery instead of tag string.
Refactor RelatedTagCalculator and RelatedTagQuery to take a PostQuery object instead of a raw tag string. * Fixes the related tag sidebar on the post index page having to reparse the query and reevaluate aliases. * Fixes related tags being affected by the current user's safe mode and hide deleted posts settings.
This commit is contained in:
@@ -40,7 +40,7 @@ module PostSetPresenters
|
||||
end
|
||||
|
||||
def similar_tags
|
||||
RelatedTagCalculator.cached_similar_tags_for_search(post_set.tag_string, MAX_TAGS, CurrentUser.user)
|
||||
RelatedTagCalculator.cached_similar_tags_for_search(post_set.query, MAX_TAGS)
|
||||
end
|
||||
|
||||
def frequent_tags
|
||||
|
||||
Reference in New Issue
Block a user