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.24 -r1.25 --- openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 12 Jun 2007 10:34:47 -0000 1.24 +++ openacs-4/packages/contacts/tcl/contacts-procs-postgresql.xql 12 Jun 2007 13:12:47 -0000 1.25 @@ -28,9 +28,10 @@ - select person_id from persons + select person_id, first_names,last_name,email from persons, parties where person_id not in (select item_id from cr_items where content_type = 'contact_party_revision') and person_id > 0 + and person_id = party_id @@ -159,7 +160,7 @@ 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 from (select g.* from groups g left join application_groups ag on (ag.group_id = g.group_id) - where package_id is null and group_name not like 'forumgroup_%') groups2 + 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 where groups2.group_id not in ('-1','[contacts::default_group -package_id $package_id]') Index: openacs-4/packages/contacts/tcl/contacts-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-procs.tcl,v diff -u -N -r1.109 -r1.110 --- openacs-4/packages/contacts/tcl/contacts-procs.tcl 12 Jun 2007 10:34:47 -0000 1.109 +++ openacs-4/packages/contacts/tcl/contacts-procs.tcl 12 Jun 2007 13:12:47 -0000 1.110 @@ -139,15 +139,13 @@ foreach group_id $default_groups { if {[group::party_member_p -party_id $person_id -group_id $group_id]} { - ns_log notice "contacts::sweeper creating content_item and content_revision for party_id: $person_id" set contact_revision_id [contact::revision::new -party_id $person_id -package_id $contact_package($group_id)] break } } if {![exists_and_not_null contact_revision_id]} { # We did not found a group, so just use the first contacts instance. - ns_log notice "contacts::sweeper creating content_item and content_revision for party_id: $person_id" if {[ad_conn isconnected]} { set user_id [ad_conn user_id] set peeraddr [ad_conn peeraddr] @@ -167,12 +165,12 @@ # And insert into the default group for this package. group::add_member -user_id $person_id -group_id $default_group_id -no_perm_check + ns_log notice "contacts::sweeper creating content_item and content_revision for party_id: $person_id in $default_group_id" } db_foreach get_organizations_without_items {} { foreach group_id $default_groups { if {[group::party_member_p -party_id $organization_id -group_id $group_id]} { - ns_log notice "contacts::sweeper creating content_item and content_revision for party_id: $organization_id" contact::revision::new -party_id $organization_id -package_id $contact_package($group_id) -creation_user 0 break }