Permalink
Browse files

Make the formating more clever

  • Loading branch information...
1 parent ab065fd commit 32ac3f81968e7a1bd504d35bc7adcb01a6199c97 @mhujer committed Feb 1, 2012
Showing with 5 additions and 1 deletion.
  1. +5 −1 adminer/include/functions.inc.php
@@ -901,5 +901,9 @@ function format_size($size) {
$size = $size;
$unit = 'B';
}
- return number_format($size, 0, '.', lang(',')) . ' ' . $unit;
+ if (round($size) != $size) {
+ return number_format($size, 2, '.', lang(',')) . ' ' . $unit;
+ } else {
+ return number_format($size, 0, '.', lang(',')) . ' ' . $unit;
+ }
}

0 comments on commit 32ac3f8

Please sign in to comment.