Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.25.2.3 -r1.25.2.4 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 18 Feb 2003 01:45:42 -0000 1.25.2.3 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 20 Mar 2003 22:13:59 -0000 1.25.2.4 @@ -322,10 +322,6 @@ } { Return a list the object_ids contained by a file storage folder. - This would be trivial if it weren't for the fact that we need to UNION ALL - with the gawddamned fs_simple_objects Open Force forced upon us and which - will be removed as soon as I (DRB) find the time to write upgrade scripts. - @param folder_id The folder for which to retrieve contents @param user_id The viewer of the contents (to make sure they have permission) @@ -410,7 +406,7 @@ if {[string equal folder $type]} { set result [publish_folder_to_file_system -folder_id $object_id -path $path -folder_name $name -user_id $user_id] } elseif {[string equal url $type]} { - set result [publish_simple_object_to_file_system -object_id $object_id -path $path -file_name $file_name] + set result [publish_url -object_id $object_id -path $path -file_name $file_name] } else { set result [publish_versioned_object_to_file_system -object_id $object_id -path $path] } @@ -449,29 +445,9 @@ return $dir } - ad_proc -public publish_simple_object_to_file_system { + ad_proc -public publish_url_to_file_system { {-object_id:required} {-path ""} - {-file_name:required} - } { - publish a simple object to the file system; you must implement a proc - named 'fs::publish_simple__to_file_system', where is the - fs_simple_object type that you create, for each new simple file storage - object you create. - } { - if {[empty_string_p $path]} { - set path [ns_tmpnam] - file mkdir $path - } - - set object [db_list_of_ns_sets select_object_info {}] - - return [publish_simple_[ns_set get $object type]_to_file_system -object $object -path $path -file_name $file_name] - } - - ad_proc -public publish_simple_url_to_file_system { - {-object:required} - {-path ""} {-file_name ""} } { publish a url object to the file system @@ -481,15 +457,15 @@ file mkdir $path } - set object [lindex $object 0] + db_1row select_object_metadata {} if {[empty_string_p $file_name]} { - set file_name [ns_set get $object name] + set file_name $label } set file_name [remove_special_file_system_characters -string $file_name] set fp [open [file join ${path} ${file_name}] w] - puts $fp [ns_set get $object url] + puts $fp url close $fp return [file join ${path} ${file_name}]