remove enable_email_names setting

This commit is contained in:
Arpit Jalan
2015-01-13 13:31:58 +05:30
parent 3cea85e09a
commit 7771d2fb31
4 changed files with 6 additions and 9 deletions

View File

@@ -127,7 +127,7 @@ class UserNotifications < ActionMailer::Base
title: post.topic.title,
post: post,
username: post.user.username,
from_alias: (SiteSetting.enable_email_names && !post.user.name.empty?) ? post.user.name : post.user.username,
from_alias: (SiteSetting.enable_names && !post.user.name.empty?) ? post.user.name : post.user.username,
allow_reply_by_email: true,
use_site_subject: true,
add_re_to_subject: true,
@@ -172,7 +172,7 @@ class UserNotifications < ActionMailer::Base
return unless @post = opts[:post]
user_name = @notification.data_hash[:original_username]
if @post && SiteSetting.enable_email_names
if @post && SiteSetting.enable_names
user_name = User.find_by(id: @post.user_id).name if !User.find_by(id: @post.user_id).name.empty?
end