Index: openacs-4/packages/contacts/lib/contact-attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-attributes.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/lib/contact-attributes.tcl 27 Apr 2006 06:37:21 -0000 1.8 +++ openacs-4/packages/contacts/lib/contact-attributes.tcl 22 Jun 2007 05:33:11 -0000 1.9 @@ -19,7 +19,7 @@ } if {[empty_string_p $package_id]} { - set package_id [ad_conn package_id] + set package_id [contact::package_id -party_id $party_id] } set object_type [util_memoize [list acs_object_type $party_id]] @@ -42,8 +42,6 @@ set revision_id [contact::live_revision -party_id $party_id] } - - # The categories multirow contains all categories for all trees and is # prepared for easy access later on. Index: openacs-4/packages/contacts/lib/contact-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-master.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/lib/contact-master.adp 22 Jun 2007 05:31:44 -0000 1.6 +++ openacs-4/packages/contacts/lib/contact-master.adp 22 Jun 2007 05:33:11 -0000 1.7 @@ -1,5 +1,5 @@ - + @title@ @context@ Index: openacs-4/packages/contacts/lib/contact-relationships.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/lib/contact-relationships.adp 3 May 2006 22:38:55 -0000 1.8 +++ openacs-4/packages/contacts/lib/contact-relationships.adp 22 Jun 2007 05:33:11 -0000 1.9 @@ -3,9 +3,6 @@

@rels.relationship@

-
- @rels.relationship@: -
@rels.contact@ Index: openacs-4/packages/contacts/lib/contact-relationships.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/contacts/lib/contact-relationships.tcl 8 Sep 2006 13:49:54 -0000 1.14 +++ openacs-4/packages/contacts/lib/contact-relationships.tcl 22 Jun 2007 05:33:11 -0000 1.15 @@ -19,7 +19,7 @@ } if {[empty_string_p $package_id]} { - set package_id [ad_conn package_id] + set package_id [contact::package_id -party_id $party_id] } set contacts_default_group [contacts::default_group -package_id $package_id] @@ -36,9 +36,17 @@ multirow create rels relationship relation_url rel_id contact contact_url attribute value creation_date role +# Get the groups for adding and make sure we have the permisison working. set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id and group_id > 0}] lappend groups_belonging_to [contacts::default_group] +set groups_belonging_to2 [list] +foreach group_id $groups_belonging_to { + if {[permission::permission_p -object_id $group_id -privilege "write"]} { + lappend groups_belonging_to2 $group_id + } +} + db_foreach get_relationships {} { if {[group::party_member_p -party_id $other_party_id -group_id $contacts_default_group]} { set contact_url [contact::url -party_id $other_party_id] @@ -48,7 +56,7 @@ set other_object_type "person" } if {[string eq $rel_type "contact_rels_employment"]} { - set relation_url [export_vars -base "[ad_conn package_url]add/$other_object_type" -url {{group_ids $groups_belonging_to} {object_id_two "$party_id"} rel_type}] + set relation_url [export_vars -base "[apm_package_url_from_id $package_id]add/$other_object_type" -url {{group_ids $groups_belonging_to2} {object_id_two "$party_id"} rel_type return_url}] } else { set relation_url "" } Index: openacs-4/packages/contacts/lib/contacts-master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contacts-master.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/lib/contacts-master.adp 22 Jun 2007 05:31:44 -0000 1.6 +++ openacs-4/packages/contacts/lib/contacts-master.adp 22 Jun 2007 05:33:11 -0000 1.7 @@ -1,5 +1,5 @@ - + @title@ @context@ Index: openacs-4/packages/contacts/lib/projects-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/projects-portlet.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/contacts/lib/projects-portlet.adp 12 Oct 2005 22:39:08 -0000 1.1 +++ openacs-4/packages/contacts/lib/projects-portlet.adp 22 Jun 2007 05:33:11 -0000 1.2 @@ -19,6 +19,7 @@ base_url="@base_url@" customer_id="@customer_id@" status_id="@status_id@" + current_package_f="@package_id@" fmt="@fmt@">