Index: openacs-4/packages/acs-tcl/tcl/application-data-link-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/application-data-link-procs.xql,v diff -u -r1.1.2.2 -r1.1.2.3 --- openacs-4/packages/acs-tcl/tcl/application-data-link-procs.xql 26 Jul 2005 16:43:57 -0000 1.1.2.2 +++ openacs-4/packages/acs-tcl/tcl/application-data-link-procs.xql 14 Dec 2005 22:12:51 -0000 1.1.2.3 @@ -1,44 +1,61 @@ + + + insert into acs_data_links (rel_id, object_id_one, object_id_two) + values (:forward_rel_id, :this_object_id, :target_object_id) + + + + + + insert into acs_data_links (rel_id, object_id_one, object_id_two) + values (:backward_rel_id, :target_object_id, :this_object_id) + + + select rel_id - from acs_rels - where rel_type = 'application_data_link' - and (object_id_one = :object_id + from acs_data_links + where (object_id_one = :object_id or object_id_two = :object_id) + + + delete from acs_data_links + where rel_id = :rel_id + + + select object_id_two - from acs_rels + from acs_data_links where object_id_one = :package_id - and rel_type = 'application_data_link' select o.object_id - from acs_rels r, acs_objects o + from acs_data_links r, acs_objects o where r.object_id_one = :from_object_id and r.object_id_two = o.object_id and o.object_type = :to_object_type - and r.rel_type = 'application_data_link' select i.item_id - from acs_rels r, cr_items i + from acs_data_links r, cr_items i where r.object_id_one = :from_object_id and r.object_id_two = i.item_id and i.content_type = :to_content_type - and r.rel_type = 'application_data_link'