Index: openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql,v diff -u -r1.15 -r1.16 --- openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 22 May 2002 08:50:52 -0000 1.15 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 24 Jun 2002 19:14:55 -0000 1.16 @@ -41,23 +41,25 @@ - select fs_objects.object_id, - fs_objects.name, - fs_objects.live_revision, - fs_objects.type, - to_char(fs_objects.last_modified, 'Month DD YYYY HH24:MI') as last_modified, - fs_objects.content_size, - fs_objects.url, - fs_objects.key, - case when fs_objects.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p, - decode(acs_permission.permission_p(fs_objects.object_id, :user_id, 'write'), 'f', 0, 1) as write_p, - decode(acs_permission.permission_p(fs_objects.object_id, :user_id, 'delete'), 'f', 0, 1) as delete_p, - decode(acs_permission.permission_p(fs_objects.object_id, :user_id, 'admin'), 'f', 0, 1) as admin_p - from fs_objects - where fs_objects.parent_id = :folder_id - and 't' = acs_permission.permission_p(fs_objects.object_id, :user_id, 'read') - order by fs_objects.sort_key, - fs_objects.name + select fc.* + from (select fs_objects.object_id, + fs_objects.name, + fs_objects.live_revision, + fs_objects.type, + to_char(fs_objects.last_modified, 'Month DD YYYY HH24:MI') as last_modified, + fs_objects.content_size, + fs_objects.url, + fs_objects.key, + fs_objects.sort_key, + case when fs_objects.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p, + acs_permission.permission_p(fs_objects.object_id, :user_id, 'admin') as admin_p, + acs_permission.permission_p(fs_objects.object_id, :user_id, 'delete') as delete_p, + acs_permission.permission_p(fs_objects.object_id, :user_id, 'write') as write_p + from fs_objects + where fs_objects.parent_id = :folder_id) fc + where 't' = (select acs_permission.permission_p(fc.object_id, :user_id, 'read') from dual) + order by fc.sort_key, + fc.name