- abbreviation for kilo bytes is kB not KB

This commit is contained in:
steinm 2013-02-08 07:28:02 +00:00
parent 604fcb61e0
commit a9851eed00

View File

@ -52,7 +52,7 @@ class LetoDMS_Core_File {
return $filesize; return $filesize;
} }
function format_filesize($size, $sizes = array('Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB')) { function format_filesize($size, $sizes = array('Bytes', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB')) {
if ($size == 0) return('n/a'); if ($size == 0) return('n/a');
return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $sizes[$i]); return (round($size/pow(1024, ($i = floor(log($size, 1024)))), 2) . ' ' . $sizes[$i]);
} }