Index: openacs-4/packages/contacts/www/relationship-bulk-add-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/relationship-bulk-add-postgresql.xql,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/contacts/www/relationship-bulk-add-postgresql.xql 24 Mar 2006 13:18:04 -0000 1.1 +++ openacs-4/packages/contacts/www/relationship-bulk-add-postgresql.xql 20 Apr 2006 14:09:07 -0000 1.2 @@ -83,12 +83,12 @@ select rel_id from acs_rels where rel_type = :rel_type - and object_id_one = :object_id_one - and object_id_two = :object_id_two + and ((:switch_roles_p = 0 and object_id_one = :object_id_one and object_id_two = :object_id_two) + or (:switch_roles_p = 1 and object_id_one = :object_id_two and object_id_two = :object_id_one)) - + select acs_rel__new ( :rel_id, @@ -102,6 +102,20 @@ + + +select acs_rel__new ( + :rel_id, + :rel_type, + :object_id_two, + :object_id_one, + :context_id, + :creation_user, + :creation_ip + ) + + + insert into contact_rels