Fixed MailHandler broken by I18n fallback added in r4679.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4682 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
a9c4ec31ca
commit
7b7577c747
|
@ -235,8 +235,8 @@ class MailHandler < ActionMailer::Base
|
|||
def extract_keyword!(text, attr, format=nil)
|
||||
keys = [attr.to_s.humanize]
|
||||
if attr.is_a?(Symbol)
|
||||
keys << l("field_#{attr}", :default => '', :locale => user.language) if user
|
||||
keys << l("field_#{attr}", :default => '', :locale => Setting.default_language)
|
||||
keys << l("field_#{attr}", :default => '', :locale => user.language) if user && user.language.present?
|
||||
keys << l("field_#{attr}", :default => '', :locale => Setting.default_language) if Setting.default_language.present?
|
||||
end
|
||||
keys.reject! {|k| k.blank?}
|
||||
keys.collect! {|k| Regexp.escape(k)}
|
||||
|
|
Loading…
Reference in New Issue