disable tag backlinking on posts for anon users (helps with web crawlers)
This commit is contained in:
@@ -22,7 +22,7 @@ class PostPresenter < Presenter
|
|||||||
path = options[:path_prefix] || "/posts"
|
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)}>}
|
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])}"
|
tag_param = "?tags=#{CGI::escape(options[:tags])}"
|
||||||
elsif options[:pool_id] || options[:pool]
|
elsif options[:pool_id] || options[:pool]
|
||||||
tag_param = "?pool_id=#{CGI::escape((options[:pool_id] || options[:pool].id).to_s)}"
|
tag_param = "?pool_id=#{CGI::escape((options[:pool_id] || options[:pool].id).to_s)}"
|
||||||
|
|||||||
Reference in New Issue
Block a user