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
This commit is contained in:
Jean-Philippe Lang
2010-01-10 14:54:02 +00:00
parent fe7d65922b
commit ff77fb6aa9
2 changed files with 17 additions and 1 deletions
+2
View File
@@ -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