Index: openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl,v diff -u -r1.39 -r1.40 --- openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 4 May 2006 23:35:49 -0000 1.39 +++ openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 12 May 2006 21:11:49 -0000 1.40 @@ -652,39 +652,8 @@ } { } { - set list_ids "" - set group_ids [list] - foreach group [contact::groups_list] { - lappend group_ids [lindex $group 0] - } - # since contact::groups_list doesn't get the default_groups - # we have to add them here - set group_ids [concat $group_ids [contacts::default_groups]] + set list_ids [contact::util::get_ams_list_ids -user_id $user_id -package_id $package_id -privilege "read" -object_type $object_type] - foreach group_id $group_ids { - if { ![permission::permission_p -object_id $group_id -party_id $user_id -privilege read] } { - continue - } - if { $object_type ne "organization" } { - set list_id [ams::list::get_list_id \ - -package_key "contacts" \ - -object_type "person" \ - -list_name "${package_id}__${group_id}"] - if { $list_id ne "" } { - lappend list_ids $list_id - } - } - if { $object_type ne "person" } { - set list_id [ams::list::get_list_id \ - -package_key "contacts" \ - -object_type "organization" \ - -list_name "${package_id}__${group_id}"] - if { $list_id ne "" } { - lappend list_ids $list_id - } - } - } - if { [llength $list_ids] == 0 } { return {} }