Index: openacs-4/packages/oacs-dav/sql/oracle/oacs-dav-create.sql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/sql/oracle/oacs-dav-create.sql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/oacs-dav/sql/oracle/oacs-dav-create.sql 16 Feb 2004 16:49:27 -0000 1.1 +++ openacs-4/packages/oacs-dav/sql/oracle/oacs-dav-create.sql 20 Feb 2004 23:48:22 -0000 1.2 @@ -8,14 +8,14 @@ create table dav_site_node_folder_map ( node_id integer - constraint dav_site_node_folder_map_node_id_un + constraint dav_sn_folder_map_node_id_un unique - constraint dav_side_node_folder_map_node_id_fk - references apm_packages, + constraint dav_sn_folder_map_node_id_fk + references site_nodes, folder_id integer constraint dav_impls_folder_id_fk references cr_folders, enabled_p char(1) - constraint dav_site_node_folder_map_enabled_p_bl - check enabled_p in ('t','f') + constraint dav_sn_folder_map_enbld_p_bl + check (enabled_p in ('t','f')) ); Index: openacs-4/packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql 16 Feb 2004 16:49:27 -0000 1.1 +++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs-oracle.xql 20 Feb 2004 23:48:22 -0000 1.2 @@ -3,10 +3,12 @@ oracle8.1.6 - select content_item.get_id( - name => :item_name, - root_folder_id => :parent_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :item_name, + root_folder_id => :parent_id, + resolve_index => 'f'); + end; @@ -15,22 +17,23 @@ select nvl (cr.content_length,4096) as content_length, nvl (cr.mime_type,'*/*') as mime_type, - to_char(timezone('GMT',o.creation_date) :: timestamptz ,'YYYY-MM-DD"T"HH:MM:SS.MS"Z"') as creation_date, - to_char(timezone('GMT',o.last_modified) :: timestamptz ,'Dy, DD Mon YYYY HH:MM:SS TZ') as last_modified, + to_char(o.creation_date, 'YYYY-MM-DD"T"HH:MM:SS.MS"Z"') as creation_date, + to_char(o.last_modified, 'Dy, DD Mon YYYY HH:MM:SS TZ') as last_modified, ci1.item_id, - case when ci1.item_id=ci2.item_id then '' else ci1.name end as name, + case when ci1.item_id=:folder_id then '' else ci1.name end as name, content_item.get_path(ci1.item_id,:folder_id) as item_uri, case when o.object_type='content_folder' then 1 else 0 end as collection_p from ( select * from cr_items - connect by prior item_id=parent_id - start with item_id=:item_id + connect by prior parent_id=item_id + start with item_id=:folder_id ) ci1, - cr_revisions, + cr_revisions cr, acs_objects o where - ci1.live_revision(+) = cr.revision_id, + ci1.item_id=o.object_id and + ci1.live_revision = cr.revision_id(+) and exists (select 1 from acs_object_party_privilege_map m where m.object_id = ci1.item_id @@ -48,8 +51,8 @@ content_item__get_path(ci.item_id,:folder_id) as item_uri, coalesce(cr.mime_type,'*/*') as mime_type, cr.content_length, - to_char(timezone('GMT',o.creation_date) :: timestamptz ,'YYYY-MM-DD"T"HH:MM:SS.MS"Z"') as creation_date, - to_char(timezone('GMT',o.last_modified) :: timestamptz ,'Dy, DD Mon YYYY HH:MM:SS TZ') as last_modified + to_char(o.creation_date, 'YYYY-MM-DD"T"HH:MM:SS.MS"Z"') as creation_date, + to_char(o.last_modified, 'Dy, DD Mon YYYY HH:MM:SS TZ') as last_modified from cr_items ci, acs_objects o, cr_revisions cr @@ -79,163 +82,197 @@ - select content_folder.copy ( - folder_id => :copy_folder_id, - target_folder_id => :new_parent_folder_id, - creation_user => :user_id, - creation_ip => :peer_addr, - name => :new_name - ) + begin + :1 := content_folder.copy ( + folder_id => :copy_folder_id, + target_folder_id => :new_parent_folder_id, + creation_user => :user_id, + creation_ip => :peer_addr, + name => :new_name + ); + end; - select content_folder.move ( - folder_id => :move_folder_id, - target_folder_id => :new_parent_folder_id, - name => :new_name - ) + begin + :1 := content_folder.move ( + folder_id => :move_folder_id, + target_folder_id => :new_parent_folder_id, + name => :new_name + ); + end; - select content_folder.rename ( - folder_id => :move_folder_id, - name => :new_name, - label => NULL, - description => NULL - ) + begin + content_folder.rename ( + folder_id => :move_folder_id, + name => :new_name, + label => NULL, + description => NULL + ); + end; - select content_item.move ( - item_id => :item_id, - target_folder_id => :new_parent_folder_id, - name => :new_name - ) + begin + content_item.move ( + item_id => :item_id, + target_folder_id => :new_parent_folder_id, + name => :new_name + ); + end; - select content_item.rename ( - item_id => :item_id, - name => :new_name - ) + begin + content_item.rename ( + item_id => :item_id, + name => :new_name + ); + end; - select content_item.copy ( - item_id => :copy_item_id, - target_id => :new_parent_folder_id, - creation_user => :user_id, - creation_ip => :peer_addr, - name => :new_name - ) + begin + :1 := content_item.copy ( + item_id => :copy_item_id, + target_id => :new_parent_folder_id, + creation_user => :user_id, + creation_ip => :peer_addr, + name => :new_name + ); + end; - select content_item.delete( - item_id => :dest_item_id - ) + begin + content_item.delete( + item_id => :dest_item_id + ); + end; - select content_item.delete( - item_id => :dest_item_id - ) + begin + content_item.delete( + item_id => :dest_item_id + ); + end; - select content_item.delete ( - item_id => :item_id - ) + begin + content_item.delete ( + item_id => :item_id + ); + end; - select content_folder.delete ( - folder_id => :item_id, - cascade_p => 't' - ) + begin + content_folder.delete ( + folder_id => :item_id, + cascade_p => 't' + ); + end; - select content_item.get_id( - name=> :parent_name, - root_folder_id => :root_folder_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :parent_name, + root_folder_id => :root_folder_id, + resolve_index => 'f'); + end; - select content_item.get_id( - name => :new_name, - root_folder_id => :new_parent_folder_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :new_name, + root_folder_id => :new_parent_folder_id, + resolve_index => 'f'); + end; - select content_item.get_id( - name => :new_name, - root_folder_id => :new_parent_folder_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :new_name, + root_folder_id => :new_parent_folder_id, + resolve_index => 'f'); + end; - select content_folder.delete( - folder_id => :dest_item_id, - cascade_p => 't'); + begin + content_folder.delete( + folder_id => :dest_item_id, + cascade_p => 't'); + end; - select content_folder.delete( - folder_id => :dest_item_id, - cascade_p => 't'); + begin + content_folder.delete( + folder_id => :dest_item_id, + cascade_p => 't'); + end; - select content_item.get_id( - name => :new_name, - root_folder_id => :new_parent_folder_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :new_name, + root_folder_id => :new_parent_folder_id, + resolve_index => 'f'); + end; - select content_item.get_id( - name => :new_name, - root_folder_id => :new_parent_folder_id, - resolve_index_p => 'f') + begin + :1 := content_item.get_id( + item_path => :new_name, + root_folder_id => :new_parent_folder_id, + resolve_index => 'f'); + end; Index: openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql,v diff -u -r1.2 -r1.3 --- openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 16 Feb 2004 18:59:17 -0000 1.2 +++ openacs-4/packages/oacs-dav/tcl/oacs-dav-procs.xql 20 Feb 2004 23:48:22 -0000 1.3 @@ -12,9 +12,9 @@ insert into dav_site_node_folder_map - (folder_id, node_id, enabled_p) + (node_id, folder_id, enabled_p) values - (:folder_id, :node_id, :enabled_p) + (:node_id, :folder_id, :enabled_p)