Index: openacs-4/packages/file-storage/www/move-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/move-postgresql.xql,v diff -u -N --- openacs-4/packages/file-storage/www/move-postgresql.xql 3 Nov 2017 15:58:29 -0000 1.11 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,58 +0,0 @@ - - - - - - - - - - - postgresql - 7.2 - - - - - select fs.object_id, fs.name, fs.type, fs.parent_id, - acs_permission__permission_p(fs.object_id, :user_id, 'delete') as move_p - from fs_objects fs - where fs.object_id in ([template::util::tcl_to_sql_list $object_id]) - order by move_p - - - - - - 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; - - - -