Index: openacs-4/packages/file-storage/www/file-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-oracle.xql,v diff -u -r1.14 -r1.15 --- openacs-4/packages/file-storage/www/file-oracle.xql 29 Jun 2004 10:18:25 -0000 1.14 +++ openacs-4/packages/file-storage/www/file-oracle.xql 23 Nov 2017 10:06:32 -0000 1.15 @@ -3,13 +3,6 @@ oracle8.1.6 - - - select content_item.get_parent_folder(:file_id) - from dual - - - @@ -53,24 +46,9 @@ where m.object_id = r.revision_id and m.party_id = :user_id and m.privilege = 'read') - $show_versions order by last_modified desc + and $show_versions order by last_modified desc - - - - - - - - - - and r.revision_id = i.live_revision - - - - - Index: openacs-4/packages/file-storage/www/file-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-postgresql.xql,v diff -u -r1.17 -r1.18 --- openacs-4/packages/file-storage/www/file-postgresql.xql 7 Aug 2017 23:48:11 -0000 1.17 +++ openacs-4/packages/file-storage/www/file-postgresql.xql 23 Nov 2017 10:06:32 -0000 1.18 @@ -3,12 +3,6 @@ postgresql7.1 - - - select content_item__get_parent_folder(:file_id) - - - @@ -78,21 +72,6 @@ - - - - - - - - - - - and r.revision_id = i.live_revision - - - - Index: openacs-4/packages/file-storage/www/file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/file-storage/www/file.tcl 7 Aug 2017 23:48:11 -0000 1.36 +++ openacs-4/packages/file-storage/www/file.tcl 23 Nov 2017 10:06:32 -0000 1.37 @@ -37,16 +37,15 @@ db_1row file_info "" # get folder id so we can implement a back link -set folder_id [db_string get_folder {}] +set folder_id [content::item::get_parent_folder -item_id $file_id] set folder_write_p [permission::permission_p -object_id $folder_id -privilege write] set folder_view_url [export_vars -base index {folder_id}] -# We use the new db_map here if { $show_all_versions_p } { - set show_versions [db_map show_all_versions] + set show_versions "" } else { - set show_versions [db_map show_live_version] + set show_versions "and r.revision_id = i.live_revision" } set not_show_all_versions_p [expr {!$show_all_versions_p}]