Index: openacs-4/packages/file-storage/sql/oracle/file-storage-views-create.sql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/sql/oracle/file-storage-views-create.sql,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/file-storage/sql/oracle/file-storage-views-create.sql	17 May 2003 10:37:05 -0000	1.7
+++ openacs-4/packages/file-storage/sql/oracle/file-storage-views-create.sql	17 May 2004 15:15:13 -0000	1.8
@@ -78,13 +78,14 @@
       case
         when cr_items.content_type = 'content_folder' then cr_folders.label
         when cr_items.content_type = 'content_extlink' then cr_extlinks.label
-        else cr_items.name
+        else nvl(cr_revisions.title,cr_items.name)
       end as name,
-      cr_revisions.title as file_upload_name,
+      cr_items.name as file_upload_name,
       acs_objects.last_modified,
       cr_extlinks.url,
       cr_items.parent_id,
       cr_items.name as key,
+      cr_mime_types.label as pretty_type
       case
         when cr_items.content_type = 'content_folder' then 0
         else 1
@@ -93,4 +94,5 @@
     where cr_items.item_id = cr_extlinks.extlink_id(+)
       and cr_items.item_id = cr_folders.folder_id(+)
       and cr_items.item_id = acs_objects.object_id
-      and cr_items.live_revision = cr_revisions.revision_id(+);
+      and cr_items.live_revision = cr_revisions.revision_id(+)
+      and cr_revisions.mime_type = cr_mime_types.mime_type(+);
