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 -N -r1.1.4.2 -r1.1.4.3 --- openacs-4/packages/file-storage/www/view/index.vuh 6 Mar 2005 10:03:16 -0000 1.1.4.2 +++ openacs-4/packages/file-storage/www/view/index.vuh 6 Mar 2005 11:09:31 -0000 1.1.4.3 @@ -36,20 +36,34 @@ if { [string equal "" $file_id] } { set splitted_url [split $the_url "/"] set item_url_title [lindex $splitted_url end] + + # THIS CODE ONLY TAKES TWO FOLDERS INTO ACCOUNT. THIS NEEDS TO BE FIXED LATER set item_url_folder [lindex $splitted_url end-1] - set file_id [db_string upgraded_item_id {}] + set item_url_parent_folder [lindex $splitted_url end-2] + set file_id [db_string upgraded_item_id {} -default 0] } - if {![exists_and_not_null version_id]} { - set version_id [item::get_live_revision $file_id] + if {$file_id == 0} { + # ns_returnnotfound + set page "[ad_header {Content Item Not Found}]" + append page "