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.8 -r1.8.4.1
--- openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql	17 May 2003 10:38:11 -0000	1.8
+++ openacs-4/packages/file-storage/sql/postgresql/file-storage-views-create.sql	16 May 2004 16:53:08 -0000	1.8.4.1
@@ -76,18 +76,23 @@
       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 coalesce(cr_revisions.title,cr_items.name)
       end as name,
-      cr_revisions.title as file_upload_name,
+      cr_items.name as file_upload_name,
+      cr_revisions.mime_type,
       acs_objects.last_modified,
       cr_extlinks.url,
       cr_items.parent_id,
       cr_items.name as key,
       case
         when cr_items.content_type = 'content_folder' then 0
         else 1
-      end as sort_key
+      end as sort_key,
+	cr_mime_types.label as pretty_type
+
     from cr_items left join cr_extlinks on (cr_items.item_id = cr_extlinks.extlink_id)
+      
       left join cr_folders on (cr_items.item_id = cr_folders.folder_id)
       left join cr_revisions on (cr_items.live_revision = cr_revisions.revision_id)
+      left join cr_mime_types on (cr_revisions.mime_type = cr_mime_types.mime_type)
       join acs_objects on (cr_items.item_id = acs_objects.object_id);
