disable tag backlinking on posts for anon users (helps with web crawlers)

This commit is contained in:
r888888888
2016-06-14 12:14:10 -07:00
parent aa77ba3874
commit 27264501e0

View File

@@ -22,7 +22,7 @@ class PostPresenter < Presenter
path = options[:path_prefix] || "/posts"
html = %{<article itemscope itemtype="http://schema.org/ImageObject" id="post_#{post.id}" class="#{preview_class(post, options[:pool])}" #{data_attributes(post)}>}
if options[:tags].present?
if options[:tags].present? && !CurrentUser.is_anonymous?
tag_param = "?tags=#{CGI::escape(options[:tags])}"
elsif options[:pool_id] || options[:pool]
tag_param = "?pool_id=#{CGI::escape((options[:pool_id] || options[:pool].id).to_s)}"