Index: openacs-4/packages/file-storage/www/view/index.vuh =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/view/index.vuh,v diff -u -r1.1.8.1 -r1.1.8.2 --- openacs-4/packages/file-storage/www/view/index.vuh 26 Sep 2005 09:00:19 -0000 1.1.8.1 +++ openacs-4/packages/file-storage/www/view/index.vuh 18 Dec 2005 11:16:15 -0000 1.1.8.2 @@ -23,7 +23,6 @@ -root_folder_id $content_root \ -resolve_index "f"] - # Serve the page # DRB: Note that content::init modifies the local variable the_root, which is treated @@ -53,20 +52,25 @@ append page "[ad_footer]" doc_return 404 text/html $page } else { + + if {[content::symlink::is_symlink -item_id $file_id]} { + set file_id [content::symlink::resolve -item_id $file_id] + } + 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" - cr_write_content -revision_id $version_id } } else { if { [content::init the_url the_root $content_root $template_root public $revision_id $content_type] } { + set file "$the_root/$the_url" rp_internal_redirect -absolute_path $file } else {