Index: openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 3 May 2006 21:28:06 -0000 1.8 +++ openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 4 May 2006 12:01:47 -0000 1.9 @@ -3,12 +3,11 @@ -select rel_id, other_name, other_party_id, role_singular, role_plural, rel_type, creation_date +select rel_id, other_name, other_party_id, role_singular, rel_type, creation_date from ( select CASE WHEN object_id_one = :party_id THEN contact__name(object_id_two,'t') ELSE contact__name(object_id_one,'t') END as other_name, CASE WHEN object_id_one = :party_id THEN object_id_two ELSE object_id_one END as other_party_id, CASE WHEN object_id_one = :party_id THEN role_two ELSE role_one END as role, CASE WHEN object_id_one = :party_id THEN acs_rel_type__role_pretty_name(role_two) ELSE acs_rel_type__role_pretty_name(role_one) END as role_singular, - CASE WHEN object_id_one = :party_id THEN acs_rel_type__role_pretty_plural(role_two) ELSE acs_rel_type__role_pretty_plural(role_one) END as role_plural, acs_rels.rel_id, acs_rels.rel_type from acs_rels, acs_rel_types