Commit d77cf058 authored by Dries's avatar Dries

- Patch #23211 by Neil: better formatting of sizes in format_size().

parent 235a39e5
......@@ -806,11 +806,11 @@ function format_plural($count, $singular, $plural) {
*/
function format_size($size) {
$suffix = t('bytes');
if ($size > 1024) {
if ($size >= 1024) {
$size = round($size / 1024, 2);
$suffix = t('KB');
}
if ($size > 1024) {
if ($size >= 1024) {
$size = round($size / 1024, 2);
$suffix = t('MB');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment