diff --git a/app/views/list/list.rss.erb b/app/views/list/list.rss.erb index afeed83e0..2e48d6737 100644 --- a/app/views/list/list.rss.erb +++ b/app/views/list/list.rss.erb @@ -14,10 +14,10 @@ <% topic_url = Discourse.base_url + topic.relative_url -%> <%= topic.title %> - <%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if topic.user.name.present?})" -%> + <%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if (topic.user.name.present? && SiteSetting.enable_names?)})" -%> <%= topic.category.name %> <%= t('author_wrote', author: link_to(topic.user.name, user_url(topic.user.username_lower))).html_safe %>

+

<%= t('author_wrote', author: link_to("@#{topic.user.username}", user_url(topic.user.username_lower))).html_safe %>

<%= topic.posts.first.cooked.html_safe %>
diff --git a/app/views/topics/plain.html.erb b/app/views/topics/plain.html.erb index 7c852a3b6..88385ff7d 100644 --- a/app/views/topics/plain.html.erb +++ b/app/views/topics/plain.html.erb @@ -11,7 +11,7 @@ <% @topic_view.posts.each do |post| %> <% if post.user %>
- <%= post.user.username %> <%= "(#{post.user.name})" if SiteSetting.display_name_on_posts %> at <%= post.created_at.to_formatted_s(:long_ordinal) %> — #<%= post.post_number %> + <%= post.user.username %> <%= "(#{post.user.name})" if (SiteSetting.display_name_on_posts && SiteSetting.enable_names?) %> at <%= post.created_at.to_formatted_s(:long_ordinal) %> — #<%= post.post_number %>
<% if post.hidden %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 42421fb7b..846bdc38c 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -10,7 +10,7 @@ <% if post.user %>
<%= post.user.username %> - <%= "(#{post.user.name})" if SiteSetting.display_name_on_posts %> — + <%= "(#{post.user.name})" if (SiteSetting.display_name_on_posts && SiteSetting.enable_names?) %> — <%= post.created_at.to_formatted_s(:iso8601) %> — #<%= post.post_number %>
diff --git a/app/views/topics/show.rss.erb b/app/views/topics/show.rss.erb index 2e1271b4b..be903c7a2 100644 --- a/app/views/topics/show.rss.erb +++ b/app/views/topics/show.rss.erb @@ -15,10 +15,10 @@ <% next unless post.user %> <%= @topic_view.title %> - <%= "no-reply@example.com (@#{post.user.username}#{" #{post.user.name}" if post.user.name.present?})" -%> + <%= "no-reply@example.com (@#{post.user.username}#{" #{post.user.name}" if (post.user.name.present? && SiteSetting.enable_names?)})" -%> -

<%= t('author_wrote', author: link_to(post.user.name, user_url(post.user.username_lower))).html_safe %>

+

<%= t('author_wrote', author: link_to("@#{post.user.username}", user_url(post.user.username_lower))).html_safe %>

<% if post.hidden %> <%= t('flagging.user_must_edit').html_safe %>