FIX: full user names were showing up in crawlers and rss feeds in spite enables_names setting being disabled

This commit is contained in:
Arpit Jalan
2015-01-22 22:34:35 +05:30
parent e948dc88d1
commit 63556a904a
4 changed files with 6 additions and 6 deletions

View File

@@ -14,10 +14,10 @@
<% topic_url = Discourse.base_url + topic.relative_url -%>
<item>
<title><%= topic.title %></title>
<author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if topic.user.name.present?})" -%></author>
<author><%= "no-reply@example.com (@#{topic.user.username}#{" #{topic.user.name}" if (topic.user.name.present? && SiteSetting.enable_names?)})" -%></author>
<category><%= topic.category.name %></category>
<description><![CDATA[
<p><%= t('author_wrote', author: link_to(topic.user.name, user_url(topic.user.username_lower))).html_safe %></p>
<p><%= t('author_wrote', author: link_to("@#{topic.user.username}", user_url(topic.user.username_lower))).html_safe %></p>
<blockquote>
<%= topic.posts.first.cooked.html_safe %>
</blockquote>