merge master into autocomplete-aliased-tags
This commit is contained in:
@@ -31,8 +31,8 @@ class BulkUpdateRequest < ActiveRecord::Base
|
||||
extend SearchMethods
|
||||
|
||||
def approve!
|
||||
update_forum_topic_for_approve
|
||||
AliasAndImplicationImporter.new(script, forum_topic_id, "1").process!
|
||||
update_forum_topic_for_approve
|
||||
update_attribute(:status, "approved")
|
||||
end
|
||||
|
||||
|
||||
@@ -668,7 +668,7 @@ class Post < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def has_tag?(tag)
|
||||
!!(tag_string =~ /(?:^| )#{tag}(?:$| )/)
|
||||
!!(tag_string =~ /(?:^| )(?:#{tag})(?:$| )/)
|
||||
end
|
||||
|
||||
def has_dup_tag?
|
||||
|
||||
@@ -77,7 +77,7 @@ class TagAlias < ActiveRecord::Base
|
||||
end.uniq
|
||||
end
|
||||
|
||||
def process!
|
||||
def process!(update_topic=true)
|
||||
unless valid?
|
||||
raise errors.full_messages.join("; ")
|
||||
end
|
||||
@@ -86,7 +86,7 @@ class TagAlias < ActiveRecord::Base
|
||||
clear_all_cache
|
||||
ensure_category_consistency
|
||||
update_posts
|
||||
update_forum_topic_for_approve
|
||||
update_forum_topic_for_approve if update_topic
|
||||
update_column(:post_count, consequent_tag.post_count)
|
||||
update_column(:status, "active")
|
||||
rescue Exception => e
|
||||
|
||||
@@ -120,7 +120,7 @@ class TagImplication < ActiveRecord::Base
|
||||
self.creator_ip_addr = CurrentUser.ip_addr
|
||||
end
|
||||
|
||||
def process!
|
||||
def process!(update_topic=true)
|
||||
unless valid?
|
||||
raise errors.full_messages.join("; ")
|
||||
end
|
||||
@@ -128,7 +128,7 @@ class TagImplication < ActiveRecord::Base
|
||||
update_posts
|
||||
update_column(:status, "active")
|
||||
update_descendant_names_for_parents
|
||||
update_forum_topic_for_approve
|
||||
update_forum_topic_for_approve if update_topic
|
||||
rescue Exception => e
|
||||
update_column(:status, "error: #{e}")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user