#1865: Remove unnecessary safe mode for alias/implications

These use Post.raw_tag_match, while the bug only exists when using
Post.tag_match.
This commit is contained in:
Toks
2013-08-08 14:12:52 -04:00
parent 3323f4e251
commit 4c8b1a56d9
2 changed files with 18 additions and 22 deletions

View File

@@ -126,7 +126,6 @@ class TagAlias < ActiveRecord::Base
end end
def update_posts def update_posts
CurrentUser.without_safe_mode do
Post.without_timeout do Post.without_timeout do
Post.raw_tag_match(antecedent_name).find_each do |post| Post.raw_tag_match(antecedent_name).find_each do |post|
escaped_antecedent_name = Regexp.escape(antecedent_name) escaped_antecedent_name = Regexp.escape(antecedent_name)
@@ -142,7 +141,6 @@ class TagAlias < ActiveRecord::Base
consequent_tag.fix_post_count if consequent_tag consequent_tag.fix_post_count if consequent_tag
end end
end end
end
def rename_wiki_and_artist def rename_wiki_and_artist
antecedent_wiki = WikiPage.titled(antecedent_name).first antecedent_wiki = WikiPage.titled(antecedent_name).first

View File

@@ -126,7 +126,6 @@ class TagImplication < ActiveRecord::Base
end end
def update_posts def update_posts
CurrentUser.without_safe_mode do
Post.without_timeout do Post.without_timeout do
Post.raw_tag_match(antecedent_name).find_each do |post| Post.raw_tag_match(antecedent_name).find_each do |post|
fixed_tags = "#{post.tag_string} #{descendant_names}".strip fixed_tags = "#{post.tag_string} #{descendant_names}".strip
@@ -138,7 +137,6 @@ class TagImplication < ActiveRecord::Base
end end
end end
end end
end
def normalize_names def normalize_names
self.antecedent_name = antecedent_name.downcase.tr(" ", "_") self.antecedent_name = antecedent_name.downcase.tr(" ", "_")