This commit is contained in:
r888888888
2013-05-20 16:42:40 -07:00
parent 27a6136aee
commit b767a1c447
3 changed files with 0 additions and 5 deletions

View File

@@ -870,8 +870,6 @@ class Post < ActiveRecord::Base
module VersionMethods module VersionMethods
def create_version def create_version
return if disable_versioning
if new_record? || rating_changed? || source_changed? || parent_id_changed? || tag_string_changed? if new_record? || rating_changed? || source_changed? || parent_id_changed? || tag_string_changed?
CurrentUser.increment!(:post_update_count) CurrentUser.increment!(:post_update_count)
versions.create( versions.create(

View File

@@ -130,7 +130,6 @@ class TagAlias < ActiveRecord::Base
escaped_antecedent_name = Regexp.escape(antecedent_name) escaped_antecedent_name = Regexp.escape(antecedent_name)
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{consequent_name} ").strip fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{consequent_name} ").strip
CurrentUser.scoped(creator, creator_ip_addr) do CurrentUser.scoped(creator, creator_ip_addr) do
post.disable_versioning = true
post.update_attributes( post.update_attributes(
:tag_string => fixed_tags :tag_string => fixed_tags
) )

View File

@@ -109,7 +109,6 @@ class TagImplication < ActiveRecord::Base
escaped_tag_name = Regexp.escape(tag_name) escaped_tag_name = Regexp.escape(tag_name)
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_tag_name}(?:\Z| )/, " ").strip fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_tag_name}(?:\Z| )/, " ").strip
CurrentUser.scoped(User.find(creator_id), creator_ip_addr) do CurrentUser.scoped(User.find(creator_id), creator_ip_addr) do
post.disable_versioning = true
post.update_attributes( post.update_attributes(
:tag_string => fixed_tags :tag_string => fixed_tags
) )
@@ -155,7 +154,6 @@ class TagImplication < ActiveRecord::Base
escaped_antecedent_name = Regexp.escape(antecedent_name) escaped_antecedent_name = Regexp.escape(antecedent_name)
fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{antecedent_name} #{descendant_names} ").strip fixed_tags = post.tag_string.sub(/(?:\A| )#{escaped_antecedent_name}(?:\Z| )/, " #{antecedent_name} #{descendant_names} ").strip
CurrentUser.scoped(creator, creator_ip_addr) do CurrentUser.scoped(creator, creator_ip_addr) do
post.disable_versioning = true
post.update_attributes( post.update_attributes(
:tag_string => fixed_tags :tag_string => fixed_tags
) )