diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-10 14:54:02 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2010-01-10 14:54:02 +0000 |
commit | ff77fb6aa9f1fc74960e86c11d2c5f38d6cdfabd (patch) | |
tree | 756079023dea7a2cb6face40713992a62cba9ff7 /app/models/mailer.rb | |
parent | fe7d65922b634e264d96178fec1588aae94dc1ba (diff) | |
download | redmine-ff77fb6aa9f1fc74960e86c11d2c5f38d6cdfabd.tar.gz redmine-ff77fb6aa9f1fc74960e86c11d2c5f38d6cdfabd.zip |
Fixed: email notifications may affect language of notices on the UI (#4086).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3307 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/mailer.rb')
-rw-r--r-- | app/models/mailer.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/mailer.rb b/app/models/mailer.rb index dfd2737ab..9c409af69 100644 --- a/app/models/mailer.rb +++ b/app/models/mailer.rb @@ -272,6 +272,7 @@ class Mailer < ActionMailer::Base # Overrides default deliver! method to prevent from sending an email # with no recipient, cc or bcc def deliver!(mail = @mail) + set_language_if_valid @initial_language return false if (recipients.nil? || recipients.empty?) && (cc.nil? || cc.empty?) && (bcc.nil? || bcc.empty?) @@ -313,6 +314,7 @@ class Mailer < ActionMailer::Base private def initialize_defaults(method_name) super + @initial_language = current_language set_language_if_valid Setting.default_language from Setting.mail_from |