FIX: don't show hidden posts to crawlers, disabled javascript, and in rss feeds

This commit is contained in:
Neil Lalonde 2014-04-15 11:57:43 -04:00
parent 9cd8476453
commit f0e8423445
2 changed files with 10 additions and 2 deletions

View File

@ -9,7 +9,11 @@
#<%=post.post_number%> <%= t 'by'%>: <b><%= post.user.name %></b>, <%= post.created_at.to_formatted_s(:long_ordinal) %>
</div>
<div class='post'>
<%= post.cooked.html_safe %>
<% if post.hidden %>
<%= t('flagging.user_must_edit').html_safe %>
<% else %>
<%= post.cooked.html_safe %>
<% end %>
</div>
<hr/>
<% end %>

View File

@ -20,7 +20,11 @@
<% post_url = Discourse.base_url + post.url %>
<p><%= t('author_wrote', author: link_to(post.user.name, userpage_url(post.user.username_lower))).html_safe %></p>
<blockquote>
<%= post.cooked.html_safe %>
<% if post.hidden %>
<%= t('flagging.user_must_edit').html_safe %>
<% else %>
<%= post.cooked.html_safe %>
<% end %>
</blockquote>
<p><%= link_to t('read_full_topic'), post_url %></p>
]]></description>