2
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2025-09-05 08:59:27 +08:00

FIX: replace site_name with email_prefix in subject when use_site_subject is true

This commit is contained in:
Arpit Jalan 2017-06-21 20:52:10 +05:30
parent 4c98bd9d5f
commit 6796de8bf2
2 changed files with 16 additions and 4 deletions

View file

@ -60,8 +60,7 @@ module Email
def subject
if @opts[:use_site_subject]
subject = String.new(SiteSetting.email_subject)
subject.gsub!("%{site_name}", @template_args[:site_name])
subject.gsub!("%{email_prefix}", @template_args[:email_prefix])
subject.gsub!("%{site_name}", @template_args[:email_prefix])
subject.gsub!("%{optional_re}", @opts[:add_re_to_subject] ? I18n.t('subject_re', @template_args) : '')
subject.gsub!("%{optional_pm}", @opts[:private_reply] ? I18n.t('subject_pm', @template_args) : '')
subject.gsub!("%{optional_cat}", @template_args[:show_category_in_subject] ? "[#{@template_args[:show_category_in_subject]}] " : '')