Index: openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl 17 May 2004 15:15:14 -0000 1.7 +++ openacs-4/packages/file-storage/tcl/file-storage-dav-procs.tcl 13 Jan 2005 13:58:11 -0000 1.8 @@ -1,5 +1,3 @@ -# - ad_library { Procedures for DAV service contract implementations @@ -53,6 +51,7 @@ fs::add_file \ -package_id $package_id \ -name $name \ + -title $name \ -item_id $item_id \ -parent_id $parent_id \ -tmp_filename $tmp_filename \ @@ -68,9 +67,9 @@ } else { fs::add_version \ -name $name\ + -title $name \ -tmp_filename $tmp_filename\ -item_id $item_id \ - -parent_id $parent_id \ -creation_user $user_id \ -package_id $package_id @@ -95,9 +94,32 @@ ad_proc fs::impl::fs_object::mkcol {} { MKCOL method - not valid for resource } { - return [list 409] + set uri [oacs_dav::conn uri] + set user_id [oacs_dav::conn user_id] + set peer_addr [oacs_dav::conn peeraddr] + set item_id [oacs_dav::conn item_id] + set fname [oacs_dav::conn item_name] + set parent_id [oacs_dav::item_parent_folder_id $uri] + if {[empty_string_p $parent_id]} { + return [list 409] + } + if { ![empty_string_p $item_id]} { + return [list 405] + } + + if { [catch { + fs::new_folder \ + -name $fname \ + -pretty_name $fname \ + -parent_id $parent_id \ + -creation_user $user_id \ + -creation_ip $peer_addr \ + } ]} { + return [list 500] + } + + return [list 201] } ad_proc fs::impl::fs_object::proppatch {} { @@ -137,4 +159,13 @@ } { return "file_storage_object" -} \ No newline at end of file +} + +namespace eval fs::impl::dav_mkcol_type {} + +ad_proc fs::impl::dav_mkcol_type::get_type {} { + +} { + return "file_storage_object" +} +