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.10.2.4 -r1.10.2.5 --- openacs-4/packages/file-storage/www/view/index.vuh 6 Dec 2021 08:37:29 -0000 1.10.2.4 +++ openacs-4/packages/file-storage/www/view/index.vuh 6 Dec 2021 08:39:58 -0000 1.10.2.5 @@ -47,7 +47,7 @@ set item_url_folder [lindex $splitted_url end-1] set item_url_parent_folder [lindex $splitted_url end-2] set file_id [db_string upgraded_item_id { - select min(i.item_id) + select i.item_id from cr_revisions r, cr_items i where r.item_id = i.item_id and r.title = :item_url_title @@ -57,7 +57,7 @@ and parent_id in (select item_id from cr_items where name = :item_url_parent_folder)) - order by revision_id desc + fetch first 1 row only } -default 0] }