Index: openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql,v
diff -u -r1.5 -r1.6
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql	22 May 2002 08:50:52 -0000	1.5
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql	17 Sep 2002 21:03:25 -0000	1.6
@@ -24,14 +24,10 @@
 as
     select cr_folders.folder_id,
            cr_folders.label as name,
-           acs_objects.last_modified,
-           ((select count(*)
-             from cr_items ci
-             where ci.parent_id = cr_folders.folder_id)
-            +
-            (select count(*)
+           acs_objects.last_modified, -- JCD needs to walk tree as oracle ver
+           (select count(*)
              from fs_simple_objects
-             where fs_simple_objects.folder_id = cr_folders.folder_id)) as content_size,
+             where fs_simple_objects.folder_id = cr_folders.folder_id) as content_size,
            cr_items.parent_id,
            cr_items.name as key
     from cr_folders,
@@ -46,6 +42,7 @@
     select cr_revisions.item_id as file_id,
            cr_revisions.revision_id as live_revision,
            cr_revisions.mime_type as type,
+           cr_revisions.title as file_upload_name,
            cr_revisions.content_length as content_size,
            cr_items.name,
            acs_objects.last_modified,
@@ -66,6 +63,7 @@
            'folder' as type,
            fs_folders.content_size,
            fs_folders.name,
+           '' as file_upload_name,
            fs_folders.last_modified,
            '' as url,
            fs_folders.parent_id,
@@ -78,6 +76,7 @@
            fs_files.type,
            fs_files.content_size,
            fs_files.name,
+           fs_files.file_upload_name,
            fs_files.last_modified,
            '' as url,
            fs_files.parent_id,
@@ -90,6 +89,7 @@
            'url' as type,
            0 as content_size,
            fs_urls_full.name,
+           fs_urls_full.name as file_upload_name,
            fs_urls_full.last_modified,
            fs_urls_full.url,
            fs_urls_full.folder_id as parent_id,
