Index: openacs-4/packages/file-storage/www/copy-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/copy-postgresql.xql,v diff -u -r1.9 -r1.10 --- openacs-4/packages/file-storage/www/copy-postgresql.xql 7 Aug 2017 23:48:11 -0000 1.9 +++ openacs-4/packages/file-storage/www/copy-postgresql.xql 3 Sep 2024 15:37:38 -0000 1.10 @@ -11,16 +11,6 @@ postgresql 7.2 - - - - select fs.object_id, fs.name, fs.title, fs.parent_id, - acs_permission__permission_p(fs.object_id, :user_id, 'read') as copy_p, fs.type - from fs_objects fs - where fs.object_id in ([template::util::tcl_to_sql_list $object_id]) - order by copy_p - - @@ -48,39 +38,4 @@ - - - select - cf.folder_id, ci1.parent_id, cf.label, tree_level(ci1.tree_sortkey) as level_num - from - cr_folders cf, - cr_items ci1, - cr_items ci2 - where ci1.tree_sortkey between ci2.tree_sortkey and tree_right(ci2.tree_sortkey) - and ci2.item_id=:root_folder_id - and ci1.item_id=cf.folder_id - and acs_permission__permission_p(cf.folder_id, :user_id, 'write') - order by ci1.tree_sortkey, cf.label - - - - - postgresql8.4 - - With folder_tree as ( - select - cf.folder_id, ci1.parent_id, cf.label, - tree_level(ci1.tree_sortkey) as level_num, - acs_permission__permission_p(cf.folder_id, :user_id, 'write') as permission_p - from cr_folders cf, cr_items ci1, cr_items ci2 - where - ci1.tree_sortkey between ci2.tree_sortkey and - tree_right(ci2.tree_sortkey) - and ci2.item_id= :root_folder_id - and ci1.item_id=cf.folder_id - order by ci1.tree_sortkey, cf.label - ) select folder_id, parent_id, label, level_num from folder_tree where permission_p is true; - - -