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.8 -r1.9 --- openacs-4/packages/file-storage/www/view/index.vuh 12 Apr 2013 16:12:57 -0000 1.8 +++ openacs-4/packages/file-storage/www/view/index.vuh 27 Oct 2014 16:41:35 -0000 1.9 @@ -34,7 +34,7 @@ if {[parameter::get -parameter BehaveLikeFilesystemP -default 0] || [catch {set init_p [content::init the_url the_root $content_root $template_root public $revision_id $content_type]}] || !$init_p } { # Make sure we are not dealing with an upgraded file and there exists a file with the title - if { [string equal "" $file_id] } { + if {$file_id eq ""} { set splitted_url [split $the_url "/"] set item_url_title [lindex $splitted_url end] @@ -45,22 +45,15 @@ } if {$file_id == 0} { - # ns_returnnotfound - set page "[ad_header {Content Item Not Found}]" - append page "

Content Item Not Found

" - append page "The requested item is not available for viewing. " - append page "The item is either not available on this server or it is not in a publishable state " - append page "Unpublished items can be viewed via the CMS interface if the CMS package is installed.
" - append page "[ad_footer]" - doc_return 404 text/html $page + ns_returnnotfound } 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] + if {(![info exists version_id] || $version_id eq "")} { + set version_id [content::item::get_live_revision -item_id $file_id] } if {[apm_package_installed_p views]} { @@ -77,7 +70,7 @@ } else { - set version_id [item::get_live_revision $file_id] + set version_id [content::item::get_live_revision -item_id $file_id] permission::require_permission \ -party_id $user_id \ -object_id $version_id \