Index: openacs-4/packages/dotlrn/tcl/community-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/community-procs.xql,v diff -u -r1.92 -r1.93 --- openacs-4/packages/dotlrn/tcl/community-procs.xql 14 Nov 2017 15:46:45 -0000 1.92 +++ openacs-4/packages/dotlrn/tcl/community-procs.xql 14 Nov 2017 16:12:38 -0000 1.93 @@ -52,23 +52,15 @@ - + - select count(*) - from dotlrn_communities_all - where :parent_community_id in (select dc.parent_community_id - from dotlrn_communities_all dc - where dc.community_key = :community_key) + select 1 from dotlrn_communities_all + where (:parent_community_id is null or parent_community_id = :parent_community_id) + and community_key = :community_key + limit 1 - - - - select count(*) from dotlrn_communities_all where community_key = :community_key - - - select node_id