From d8f426985a3f7443af59d23bbf1dff5e586c428e Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Sat, 28 May 2011 20:00:30 +0200 Subject: use correct suffixes for sizes Signed-off-by: Florian Pritz --- application/helpers/filebin_helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'application') diff --git a/application/helpers/filebin_helper.php b/application/helpers/filebin_helper.php index 3d6c30b76..4063fd3fb 100644 --- a/application/helpers/filebin_helper.php +++ b/application/helpers/filebin_helper.php @@ -3,7 +3,7 @@ // Source: http://ibnuyahya.com/format-bytes-to-kb-mb-gb/ function format_bytes($size, $precision = 2){ $base = log($size) / log(1024); - $suffixes = array('B', 'kB', 'MB', 'GB', 'TB' , 'PB' , 'EB'); + $suffixes = array('B', 'KiB', 'MiB', 'GiB', 'TiB' , 'PiB' , 'EiB'); return round(pow(1024, $base - floor($base)), $precision) . $suffixes[floor($base)]; } -- cgit v1.2.3-24-g4f1b