Index: openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql,v
diff -u -N -r1.25 -r1.26
--- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 12 Jun 2007 13:12:47 -0000 1.25
+++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 21 Jun 2007 20:06:42 -0000 1.26
@@ -153,21 +153,23 @@
select groups2.group_id,
- acs_objects.title as group_name,
+ $name_field as group_name,
( select count(distinct gamm.member_id) from group_approved_member_map gamm where gamm.group_id = groups2.group_id ) as member_count,
( select count(distinct gcm.component_id) from group_component_map gcm where gcm.group_id = groups2.group_id) as component_count,
CASE WHEN contact_groups.package_id is not null THEN '1' ELSE '0' END as mapped_p,
CASE WHEN default_p THEN '1' ELSE '0' END as default_p,
- CASE WHEN user_change_p THEN '1' ELSE '0' END as user_change_p
+ CASE WHEN user_change_p THEN '1' ELSE '0' END as user_change_p,
+ $dotlrn_community_p as dotlrn_community_p
from (select g.* from groups g left join application_groups ag on (ag.group_id = g.group_id)
where (package_id is null or g.group_id = 1231) and group_name not like 'forumgroup_%') groups2
left join ( select * from contact_groups where package_id = :package_id ) as contact_groups on ( groups2.group_id = contact_groups.group_id ),
acs_objects
+ $additional_from
where groups2.group_id not in ('-1','[contacts::default_group -package_id $package_id]')
and groups2.group_id = acs_objects.object_id
and groups2.group_id not in ( select gcm.component_id from group_component_map gcm where gcm.group_id != -1 )
- $filter_clause
- order by mapped_p desc, CASE WHEN contact_groups.default_p THEN '000000000' ELSE upper(groups2.group_name) END
+ $additional_where
+ order by mapped_p desc, CASE WHEN contact_groups.default_p THEN '000000000' ELSE upper( $name_field ) END
@@ -220,6 +222,14 @@
+
+
+ select 1 from contact_groups
+ where group_id = :group_id
+ and package_id = :package_id
+
+
+
insert into cr_items