Index: openacs-4/packages/file-storage/www/view/index-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/view/index-oracle.xql,v diff -u -r1.1.4.1 -r1.1.4.2 --- openacs-4/packages/file-storage/www/view/index-oracle.xql 6 Mar 2005 10:03:16 -0000 1.1.4.1 +++ openacs-4/packages/file-storage/www/view/index-oracle.xql 6 Mar 2005 10:26:40 -0000 1.1.4.2 @@ -14,13 +14,15 @@ -select 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 and i.parent_id = (select item_id from cr_items - where name = :item_url_folder) + where name = :item_url_folder + and rownum = 1) + and rownum = 1 order by revision_id desc Index: openacs-4/packages/file-storage/www/view/index-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/view/index-postgresql.xql,v diff -u -r1.1.4.1 -r1.1.4.2 --- openacs-4/packages/file-storage/www/view/index-postgresql.xql 6 Mar 2005 10:03:16 -0000 1.1.4.1 +++ openacs-4/packages/file-storage/www/view/index-postgresql.xql 6 Mar 2005 10:26:40 -0000 1.1.4.2 @@ -20,7 +20,8 @@ and r.title = :item_url_title and i.parent_id = (select item_id from cr_items - where name = :item_url_folder) + where name = :item_url_folder + limit 1) order by revision_id desc limit 1