From 29b32e2c073aa8ddd38ef449e7e50b5843c9e0f8 Mon Sep 17 00:00:00 2001 From: willtp87 Date: Mon, 14 Jul 2014 13:32:32 +0000 Subject: [PATCH] not lying about units --- includes/utilities.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/utilities.inc b/includes/utilities.inc index d0fffa94..26633df5 100644 --- a/includes/utilities.inc +++ b/includes/utilities.inc @@ -30,16 +30,16 @@ function islandora_convert_bytes_to_human_readable($bytes, $precision = 2) { return $bytes . ' B'; } elseif (($bytes >= $kilobyte) && ($bytes < $megabyte)) { - return round($bytes / $kilobyte, $precision) . ' KB'; + return round($bytes / $kilobyte, $precision) . ' KiB'; } elseif (($bytes >= $megabyte) && ($bytes < $gigabyte)) { - return round($bytes / $megabyte, $precision) . ' MB'; + return round($bytes / $megabyte, $precision) . ' MiB'; } elseif (($bytes >= $gigabyte) && ($bytes < $terabyte)) { - return round($bytes / $gigabyte, $precision) . ' GB'; + return round($bytes / $gigabyte, $precision) . ' GiB'; } elseif ($bytes >= $terabyte) { - return round($bytes / $terabyte, $precision) . ' TB'; + return round($bytes / $terabyte, $precision) . ' TiB'; } else { return $bytes . ' B';