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 Index: openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql,v diff -u -r1.21 -r1.22 --- openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 22 May 2002 08:50:52 -0000 1.21 +++ openacs-4/packages/file-storage/tcl/file-storage-procs-postgresql.xql 24 Jun 2002 19:14:55 -0000 1.22 @@ -33,23 +33,25 @@ - select fs_objects.object_id, - fs_objects.name, - fs_objects.live_revision, - fs_objects.type, - to_char(fs_objects.last_modified, 'YYYY-MM-DD HH24:MI') as last_modified, - fs_objects.url, - fs_objects.key, - fs_objects.content_size, - case when fs_objects.last_modified >= (sysdate - :n_past_days) then 1 else 0 end as new_p, - case when acs_permission__permission_p(fs_objects.object_id, :user_id, 'write') = 'f' then 0 else 1 end as write_p, - case when acs_permission__permission_p(fs_objects.object_id, :user_id, 'delete') = 'f' then 0 else 1 end as delete_p, - case when acs_permission__permission_p(fs_objects.object_id, :user_id, 'admin') = 'f' then 0 else 1 end 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 >= (now() - :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 Index: openacs-4/packages/file-storage/tcl/file-storage-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/tcl/file-storage-procs.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 22 May 2002 17:01:56 -0000 1.16 +++ openacs-4/packages/file-storage/tcl/file-storage-procs.tcl 24 Jun 2002 19:14:55 -0000 1.17 @@ -354,7 +354,7 @@ } if {[empty_string_p $user_id]} { - set user_id [acs_magic_object "the_public"] + set user_id [acs_magic_object the_public] } return [db_list_of_ns_sets select_folder_contents {}]