Index: openacs-4/packages/file-storage/www/index-oracle.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/index-oracle.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/file-storage/www/index-oracle.xql 13 Aug 2001 01:07:30 -0000 1.1
@@ -0,0 +1,44 @@
+
+
+
+ oracle8.1.6
+
+
+
+
+select i.item_id as file_id,
+ r.title as name,
+ i.live_revision,
+ content_item.get_path(i.item_id,file_storage.get_root_folder(:package_id)) as path,
+ r.mime_type as type,
+ to_char(o.last_modified,'YYYY-MM-DD HH24:MI') as last_modified,
+ -- dbms_lob.getlength(r.content) as content_size,
+ -- instead of above, we rely on CR to calculate for us the size of
+ -- r.content.
+ r.content_length as content_size,
+ 1 as ordering_key
+from cr_items i, cr_revisions r, acs_objects o
+where i.item_id = o.object_id
+and i.live_revision = r.revision_id (+)
+and i.parent_id = :folder_id
+and acs_permission.permission_p(i.item_id, :user_id, 'read') = 't'
+and i.content_type = 'content_revision'
+UNION
+select i.item_id as file_id,
+ f.label as name,
+ 0,
+ content_item.get_path(f.folder_id) as path,
+ 'Folder',
+ NULL,
+ 0,
+ 0
+from cr_items i, cr_folders f
+where i.item_id = f.folder_id
+and i.parent_id = :folder_id
+and acs_permission.permission_p(folder_id, :user_id, 'read') = 't'
+order by ordering_key,name
+
+
+
+
+
Index: openacs-4/packages/file-storage/www/index-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/index-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/file-storage/www/index-postgresql.xql 13 Aug 2001 01:07:52 -0000 1.1
@@ -0,0 +1,41 @@
+
+
+
+ postgresql7.1
+
+
+
+ select i.item_id as file_id,
+ r.title as name,
+ i.live_revision,
+ content_item__get_path(i.item_id,file_storage__get_root_folder(:package_id)) as path,
+ r.mime_type as type,
+ to_char(o.last_modified,'YYYY-MM-DD HH24:MI') as last_modified,
+ -- dbms_lob.getlength(r.content) as content_size,
+ -- instead of above, we rely on CR to calculate for us
+ -- the size of r.content.
+ r.content_length as content_size,
+ 1 as ordering_key
+ from cr_items i left join cr_revisions r on (i.live_revision = r.revision_id), acs_objects o
+ where i.item_id = o.object_id
+ and i.parent_id = :folder_id
+ and acs_permission__permission_p(i.item_id, :user_id, 'read') = 't'
+ and i.content_type = 'content_revision'
+ UNION
+ select i.item_id as file_id,
+ f.label as name,
+ 0,
+ content_item__get_path(f.folder_id,null) as path,
+ 'Folder',
+ NULL,
+ 0,
+ 0
+ from cr_items i, cr_folders f
+ where i.item_id = f.folder_id
+ and i.parent_id = :folder_id
+ and acs_permission__permission_p(f.folder_id, :user_id, 'read') = 't'
+ order by ordering_key,name
+
+
+
+