Index: openacs-4/packages/file-storage/file-storage.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/file-storage.info,v diff -u -r1.38.2.2 -r1.38.2.3 --- openacs-4/packages/file-storage/file-storage.info 21 Jul 2005 18:44:41 -0000 1.38.2.2 +++ openacs-4/packages/file-storage/file-storage.info 24 Aug 2005 07:01:51 -0000 1.38.2.3 @@ -7,15 +7,15 @@ f f - + OpenACS Collaborative document storage 2004-07-21 OpenACS Provides a versioned document store with storage in the filesystem or database (depending on configuration). Documents and folders can be permissioned and folders downloaded. 0 - + @@ -35,6 +35,7 @@ + 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.48.2.5 -r1.48.2.6 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 16 Aug 2005 11:05:21 -0000 1.48.2.5 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 24 Aug 2005 07:01:51 -0000 1.48.2.6 @@ -1213,9 +1213,22 @@ set revision_id [item::get_live_revision $file_id] } - db_1row file_info {} -column_array file_object_info + db_1row file_info { + select r.item_id as file_id, r.revision_id, + r.mime_type, r.title, r.description, + r.content_length as content_size, + i.name, o.last_modified, i.parent_id, + i.storage_type, i.storage_area_key + from cr_revisions r, cr_items i, acs_objects o + where r.revision_id = :revision_id + and r.item_id = i.item_id + and i.item_id = :file_id + and i.content_type = 'file_storage_object' + and r.revision_id = o.object_id + } -column_array file_object_info - set content [db_exec_plsql get_content {}] + set content [db_exec_plsql get_content { + }] if {[string equal $file_object_info(storage_type) file]} { set filename [cr_fs_path $file_object_info(storage_area_key)] Index: openacs-4/packages/file-storage/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v diff -u -r1.31.2.5 -r1.31.2.6 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 29 Jul 2005 02:28:53 -0000 1.31.2.5 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 24 Aug 2005 07:01:52 -0000 1.31.2.6 @@ -59,7 +59,7 @@ } if {![string equal $root_folder_id $folder_id]} { - set folder_path [db_exec_plsql get_folder_path {}] + set folder_path "[db_exec_plsql get_folder_path {}]\\" } else { set folder_path "" } @@ -72,6 +72,7 @@ lappend actions "\#file-storage.Add_File\#" ${fs_url}file-add?[export_vars folder_id] "Upload a file in this folder" "\#file-storage.Create_a_URL\#" ${fs_url}simple-add?[export_vars folder_id] "Add a link to a web page" "\#file-storage.New_Folder\#" ${fs_url}folder-create?[export_vars {{parent_id $folder_id}}] "\#file-storage.Create_a_new_folder\#" set expose_rss_p [parameter::get -parameter ExposeRssP -default 0] +set like_filesystem_p [parameter::get -parameter BehaveLikeFilesystemP -default 1] set target_window_name [parameter::get -parameter DownloadTargetWindowName -default ""] if { [string equal $target_window_name ""] } { @@ -227,8 +228,13 @@ set new_version_link [_ acs-kernel.common_New] set new_version_url "${fs_url}file-add?[export_vars {{file_id $object_id}}]" set icon "/resources/file-storage/file.gif" - set file_url "${fs_url}view/${file_url}" - set download_url "${fs_url}download/$name?[export_vars {{file_id $object_id}}]" + if {$like_filesystem_p} { + set file_url "${fs_url}view/${folder_path}${title}" + set download_url "${fs_url}download/$title?[export_vars {{file_id $object_id}}]" + } else { + set file_url "${fs_url}view/${folder_path}${file_upload_name}" + set download_url "${fs_url}download/$name?[export_vars {{file_id $object_id}}]" + } } } Index: openacs-4/packages/file-storage/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/index.tcl,v diff -u -r1.27.2.1 -r1.27.2.2 --- openacs-4/packages/file-storage/www/index.tcl 1 Jul 2005 14:03:02 -0000 1.27.2.1 +++ openacs-4/packages/file-storage/www/index.tcl 24 Aug 2005 07:01:52 -0000 1.27.2.2 @@ -102,6 +102,8 @@ } } +set up_name [lang::util::localize $up_name] + set use_webdav_p [ad_parameter "UseWebDavP"] if { $use_webdav_p == 1} {