No need to be so accurate on attachment size.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 7 Jan 2009 23:37:28 +0000 (16:37 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Thu, 8 Jan 2009 00:51:34 +0000 (17:51 -0700)
imp/lib/Contents.php

index 02fbf6f..1b2fa08 100644 (file)
@@ -533,8 +533,8 @@ class IMP_Contents
                 $size = $mime_part->getSize(true);
             }
             $part['size'] = ($size > 1024)
-                ? sprintf(_("%s MB"), number_format(max(($size / 1024), 1)))
-                : sprintf(_("%s KB"), $size);
+                ? sprintf(_("%s MB"), number_format(max(($size / 1024))))
+                : sprintf(_("%s KB"), round($size) || 1);
         }
 
         /* Get part's icon. */