Index: openacs-4/packages/file-storage/www/file-oracle.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-oracle.xql,v diff -u -r1.10.2.1 -r1.10.2.2 --- openacs-4/packages/file-storage/www/file-oracle.xql 3 Apr 2004 03:41:23 -0000 1.10.2.1 +++ openacs-4/packages/file-storage/www/file-oracle.xql 16 May 2004 17:24:35 -0000 1.10.2.2 @@ -33,16 +33,18 @@ select r.title, r.revision_id as version_id, person.name(o.creation_user) as author, - r.mime_type as type, + m.label as pretty_type, to_char(o.last_modified,'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, r.description, acs_permission.permission_p(r.revision_id,:user_id,'admin') as admin_p, acs_permission.permission_p(r.revision_id,:user_id,'delete') as delete_p, r.content_length as content_size - from acs_objects o, cr_revisions r, cr_items i + from acs_objects o, cr_revisions r, cr_items i, + cr_mime_types m where o.object_id = r.revision_id and r.item_id = i.item_id and r.item_id = :file_id + and r.mime_type = m.mime_type(+) and exists (select 1 from acs_object_party_privilege_map m where m.object_id = r.revision_id Index: openacs-4/packages/file-storage/www/file-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/Attic/file-postgresql.xql,v diff -u -r1.11 -r1.11.2.1 --- openacs-4/packages/file-storage/www/file-postgresql.xql 15 Dec 2003 11:18:45 -0000 1.11 +++ openacs-4/packages/file-storage/www/file-postgresql.xql 16 May 2004 17:24:35 -0000 1.11.2.1 @@ -32,13 +32,14 @@ select r.title, r.revision_id as version_id, person__name(o.creation_user) as author, - r.mime_type as type, + m.label as pretty_type, to_char(o.last_modified,'YYYY-MM-DD HH24:MI:SS') as last_modified_ansi, r.description, acs_permission__permission_p(r.revision_id,:user_id,'admin') as admin_p, acs_permission__permission_p(r.revision_id,:user_id,'delete') as delete_p, r.content_length as content_size - from acs_objects o, cr_revisions r, cr_items i + from acs_objects o, cr_items i,cr_revisions r + left join cr_mime_types m on r.mime_type=m.mime_type where o.object_id = r.revision_id and r.item_id = i.item_id and r.item_id = :file_id Index: openacs-4/packages/file-storage/www/file.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/file.tcl,v diff -u -r1.18 -r1.18.2.1 --- openacs-4/packages/file-storage/www/file.tcl 12 Mar 2004 13:45:37 -0000 1.18 +++ openacs-4/packages/file-storage/www/file.tcl 16 May 2004 17:24:35 -0000 1.18.2.1 @@ -67,7 +67,8 @@ label \#file-storage.Size\# display_col content_size_pretty } - type { label \#file-storage.Type\#} + type { label \#file-storage.Type\# + display_col pretty_type } last_modified_ansi { label \#file-storage.Last_Modified\# display_col last_modified_pretty @@ -79,7 +80,11 @@ db_multirow -unclobber -extend { last_modified_pretty content_size_pretty version_url version_delete version_delete_url} version version_info {} { set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] - set content_size_pretty "[lc_numeric $content_size] [_ file-storage.bytes]" + if {$content_size > 0 && $content_size < 1024} { + set content_size_pretty "[lc_numeric $content_size] [_ file-storage.bytes]" + } else { + set content_size_pretty "[lc_numeric [expr $content_size / 1024 ]] [_ file-storage.kb]" +} if {[string equal $title ""]} { set title "[_ file-storage.untitled]" } Index: openacs-4/packages/file-storage/www/folder-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/www/folder-chunk.tcl,v diff -u -r1.21.2.9 -r1.21.2.10 --- openacs-4/packages/file-storage/www/folder-chunk.tcl 16 May 2004 16:53:09 -0000 1.21.2.9 +++ openacs-4/packages/file-storage/www/folder-chunk.tcl 16 May 2004 17:24:35 -0000 1.21.2.10 @@ -138,11 +138,11 @@ } else { set type [string trimleft [file extension $file_upload_name] . ] if {$content_size > 0 && $content_size < 1024} { - set content_size_pretty [lc_numeric 1] + set content_size_pretty "[lc_numeric $content_size] [_ file-storage.bytes]" } else { - set content_size_pretty [lc_numeric [expr $content_size / 1024 ]] + set content_size_pretty "[lc_numeric [expr $content_size / 1024 ]] [_ file-storage.kb]" } - append content_size_pretty " [_ file-storage.kb]" + } set file_upload_name [fs::remove_special_file_system_characters -string $file_upload_name]