Index: openacs-4/packages/xowiki/www/xinha/file-selector.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/xinha/file-selector.tcl,v diff -u -r1.21 -r1.21.2.1 --- openacs-4/packages/xowiki/www/xinha/file-selector.tcl 12 Jun 2018 09:13:16 -0000 1.21 +++ openacs-4/packages/xowiki/www/xinha/file-selector.tcl 25 Jun 2019 12:56:19 -0000 1.21.2.1 @@ -290,13 +290,10 @@ } contents get_fs_contents $fs_sql { 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] + set content_size_pretty [util::content_size_pretty -size $content_size] - if {$type eq "folder"} { - # append content_size_pretty " [_ file-storage.items]" - set content_size_pretty "" - } else { - append content_size_pretty " [_ file-storage.bytes]" + if {$type ne "folder"} { + incr content_size_total $content_size } if {$title eq ""} { set title $name @@ -305,9 +302,6 @@ set file_upload_name [ad_sanitize_filename \ -tolower \ $file_upload_name] - if { $content_size ne "" } { - incr content_size_total $content_size - } set name [lang::util::localize $name] @@ -349,7 +343,6 @@ } } - ad_return_template # Local variables: Index: openacs-4/packages/file-storage/lib/folder-links.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/file-storage/lib/folder-links.tcl,v diff -u -r1.5.2.2 -r1.5.2.3 --- openacs-4/packages/file-storage/lib/folder-links.tcl 15 Mar 2019 09:14:06 -0000 1.5.2.2 +++ openacs-4/packages/file-storage/lib/folder-links.tcl 25 Jun 2019 13:02:19 -0000 1.5.2.3 @@ -66,12 +66,7 @@ append content_size_pretty " [_ file-storage.items]" set pretty_type "Folder" } else { - if {$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]" - } - + set content_size_pretty [util::content_size_pretty -size $content_size] } set name [lang::util::localize $name] 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.39.2.1 -r1.39.2.2 --- openacs-4/packages/file-storage/www/file.tcl 15 Mar 2019 10:06:29 -0000 1.39.2.1 +++ openacs-4/packages/file-storage/www/file.tcl 25 Jun 2019 13:02:19 -0000 1.39.2.2 @@ -178,11 +178,7 @@ # set file_url [ad_urlencode $file_url] set last_modified_ansi [lc_time_system_to_conn $last_modified_ansi] set last_modified_pretty [lc_time_fmt $last_modified_ansi "%x %X"] - if {$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]" - } + set content_size_pretty [util::content_size_pretty -size $content_size] if {$title eq ""} { set title "[_ file-storage.untitled]" }