From 3c0e50b6a3068340180b1282fcde372d1850e2ac Mon Sep 17 00:00:00 2001 From: Bryan Bonvallet Date: Sun, 27 Oct 2013 16:11:26 -0400 Subject: [PATCH] filter out spam from blog index. closes https://github.com/publiclab/plots2/issues/5 --- app/controllers/tag_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/tag_controller.rb b/app/controllers/tag_controller.rb index a1815d976b..5a3d9cbd85 100644 --- a/app/controllers/tag_controller.rb +++ b/app/controllers/tag_controller.rb @@ -16,7 +16,7 @@ def show def blog @wikis = DrupalTag.find_pages(params[:id],10) nids = DrupalTag.find_nodes_by_type(params[:id],'note',20).collect(&:nid) - @notes = DrupalNode.paginate(:conditions => ['nid in (?)', nids], :order => "nid DESC", :page => params[:page]) + @notes = DrupalNode.paginate(:conditions => ['status = 1 AND nid in (?)', nids], :order => "nid DESC", :page => params[:page]) @tags = DrupalTag.find_all_by_name params[:id] @tagnames = @tags.collect(&:name).uniq! || [] @title = @tagnames.join(',') + " Blog" if @tagnames