]> source.dussan.org Git - redmine.git/commitdiff
Merged r14136 from trunk to 3.0-stable.
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 20 Mar 2015 10:47:28 +0000 (10:47 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Fri, 20 Mar 2015 10:47:28 +0000 (10:47 +0000)
revert r13896 (#14534)

git-svn-id: http://svn.redmine.org/redmine/branches/3.0-stable@14145 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/changeset.rb

index c03296451d9c337317c866a2aeddc13eb873ec95..4991910706651df350214321f0a088e465124de6 100644 (file)
@@ -69,16 +69,6 @@ class Changeset < ActiveRecord::Base
     end
   end
 
-  def committer=(arg)
-    write_attribute :committer,
-      self.class.to_utf8(arg, repository.try(:repo_log_encoding))
-  end
-
-  def comments=(arg)
-    write_attribute :comments,
-      self.class.normalize_comments(arg, repository.try(:repo_log_encoding))
-  end
-
   def committed_on=(date)
     self.commit_date = date
     super
@@ -102,7 +92,9 @@ class Changeset < ActiveRecord::Base
   end
 
   def before_create_cs
-    self.comments ||= ''
+    self.committer = self.class.to_utf8(self.committer, repository.repo_log_encoding)
+    self.comments  = self.class.normalize_comments(
+                       self.comments, repository.repo_log_encoding)
     self.user = repository.find_committer_user(self.committer)
   end