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.9 -r1.9.2.1 --- openacs-4/packages/file-storage/www/download/index.vuh 15 May 2007 20:14:37 -0000 1.9 +++ openacs-4/packages/file-storage/www/download/index.vuh 3 Apr 2008 15:34:30 -0000 1.9.2.1 @@ -19,9 +19,12 @@ } } -if {![exists_and_not_null version_id]} { +if {![exists_and_not_null version_id] && [info exists file_id]} { set version_id [item::get_live_revision $file_id] -} +} +if { ![exists_and_not_null file_id] && [info exists version_id] } { + set file_id [content::revision::item_id -revision_id $version_id] +} set user_id [ad_conn user_id] permission::require_permission -party_id $user_id -object_id $version_id -privilege read @@ -31,4 +34,3 @@ } cr_write_content -revision_id $version_id -