From 1c4752602219b6568937433a74d1a7c1e04788c5 Mon Sep 17 00:00:00 2001 From: Luciano Prestes Cavalcanti Date: Wed, 2 Sep 2015 02:08:33 +0200 Subject: [PATCH] Fix for filter_communities on communities_block with another plugin --- lib/ext/communities_block.rb | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/ext/communities_block.rb b/lib/ext/communities_block.rb index d1a839f..1d36e84 100644 --- a/lib/ext/communities_block.rb +++ b/lib/ext/communities_block.rb @@ -4,16 +4,9 @@ class CommunitiesBlock def profile_list result = get_visible_profiles + valid_communities_string = Community.get_valid_communities_string - list_without_software = [] - - result.each do |profile| - if profile.class == Community && !profile.software? - list_without_software << profile - end - end - - result = list_without_software + result.each{|community| @scope.delete(community) unless eval(valid_communities_string)} result.slice(0..get_limit-1) end @@ -45,5 +38,4 @@ class CommunitiesBlock ).sort_by {rand} end end - end -- libgit2 0.21.2