Index: openacs-4/packages/datamanager/tcl/datamanager-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/datamanager/tcl/datamanager-procs.xql,v diff -u -N -r1.1.2.5 -r1.1.2.6 --- openacs-4/packages/datamanager/tcl/datamanager-procs.xql 2 Nov 2005 17:02:19 -0000 1.1.2.5 +++ openacs-4/packages/datamanager/tcl/datamanager-procs.xql 9 Nov 2005 19:43:28 -0000 1.1.2.6 @@ -61,23 +61,58 @@ - select community_id - from dotlrn_communities_all - where community_id <> :comm_id and - (parent_community_id <> community_id or parent_community_id is null) and - (community_id in (select community_id - from dotlrn_community_applets applets - where applet_id = (select applet_id - from dotlrn_applets - where applet_key=:object_type))) + SELECT community_id + FROM dotlrn_communities_all + WHERE community_id <> :comm_id + and community_type='dotlrn_club' + and (parent_community_id <> community_id or parent_community_id is null) + and (community_id in (select dca.community_id + from dotlrn_community_applets dca, + dotlrn_applets da + where dca.applet_id = da.applet_id + and da.applet_key= :object_type)) + + + SELECT community_id + FROM dotlrn_communities_all dca, + dotlrn_classes dc, + dotlrn_departments dd + WHERE dca.community_id <> :comm_id + and dca.community_type = dc.class_key + and dc.department_key=dd.department_key + and dd.department_key=:department_key + and (parent_community_id <> community_id or parent_community_id is null) + and (community_id in (select dca.community_id + from dotlrn_community_applets dca, + dotlrn_applets da + where dca.applet_id = da.applet_id + and da.applet_key=:object_type)) + + + + + + SELECT community_id + FROM dotlrn_communities_all dca + WHERE dca.community_id <> :comm_id + and dca.community_type <> 'dotlrn_club' + and (parent_community_id <> community_id or parent_community_id is null) + and (community_id in (select dca.community_id + from dotlrn_community_applets dca, + dotlrn_applets da + where dca.applet_id = da.applet_id + and da.applet_key=:object_type)) + + + select community_id as dest_community_id, community_type, pretty_name as name, parent_community_id from dotlrn_communities_all - where community_id in ([join $communities_list_p ","]) + where community_id in ([join $communities_list_p ","])