Merged r3305, r3306, r3307, r3311 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/0.9-stable@3317 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-01-16 13:57:41 +00:00
parent f60881518a
commit c5a59aff5b
5 changed files with 36 additions and 20 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