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.5 -r1.6
--- openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 22 Feb 2002 19:06:28 -0000 1.5
+++ openacs-4/packages/file-storage/tcl/file-storage-procs-oracle.xql 22 Feb 2002 21:37:12 -0000 1.6
@@ -73,6 +73,30 @@
+
+
+ select count(*)
+ from (
+ select 1
+ from cr_items,
+ cr_revisions,
+ acs_objects
+ where cr_items.parent_id = :folder_id
+ and cr_items.content_type = 'file_storage_object'
+ and 't' = acs_permission.permission_p(cr_items.item_id, :user_id, 'read')
+ and cr_items.item_id = acs_objects.object_id
+ and cr_items.live_revision = cr_revisions.revision_id(+)
+ union
+ select 1
+ from cr_items,
+ cr_folders
+ where cr_items.parent_id = :folder_id
+ and cr_items.item_id = cr_folders.folder_id
+ and 't' = acs_permission.permission_p(cr_folders.folder_id, :user_id, 'read')
+ ) foo
+
+
+