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.21.2.11 -r1.21.2.12 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 16 May 2004 17:29:27 -0000 1.21.2.11 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 26 May 2004 21:01:27 -0000 1.21.2.12 @@ -81,7 +81,7 @@ set elements [list icon \ [list label "" \ - display_template {#file-storage.@contents.pretty_type@#}] \ + display_template {#file-storage.@contents.pretty_type@#}] \ name \ [list label [_ file-storage.Name] \ display_template {@contents.name@
@contents.file_upload_name@} \ @@ -127,7 +127,7 @@ set orderby " order by fs_objects.sort_key, fs_objects.name asc" } -db_multirow -extend { icon last_modified_pretty content_size_pretty properties_link properties_url} contents select_folder_contents {} { +db_multirow -extend { icon last_modified_pretty content_size_pretty properties_link properties_url download_url} contents select_folder_contents {} { set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] @@ -172,8 +172,9 @@ set icon "/resources/file-storage/file.gif" set file_url "${fs_url}view/${file_url}" } + } - + set download_url "download/?[export_vars {{file_id $object_id}}]" # We need to encode the hashes in any i18n message keys (.LRN plays this trick on some of its folders). # If we don't, the hashes will cause the path to be chopped off (by ns_conn url) at the leftmost hash. Index: openacs-4/packages/file-storage/www/download/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/download/index.vuh,v diff -u -r1.3 -r1.3.10.1 --- openacs-4/packages/file-storage/www/download/index.vuh 31 Oct 2001 20:42:07 -0000 1.3 +++ openacs-4/packages/file-storage/www/download/index.vuh 26 May 2004 21:01:28 -0000 1.3.10.1 @@ -9,9 +9,14 @@ @creation-date 18 December 2000 @cvs-id $Id$ } { - version_id:integer + file_id:integer,optional + version_id:integer,optional } +if {![exists_and_not_null version_id]} { + set version_id [item::get_live_revision $file_id] +} + set user_id [ad_conn user_id] ad_require_permission $version_id "read"