summaryrefslogtreecommitdiffstats
path: root/system/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'system/helpers')
-rw-r--r--system/helpers/number_helper.php18
1 files changed, 9 insertions, 9 deletions
diff --git a/system/helpers/number_helper.php b/system/helpers/number_helper.php
index 8c9e384eb..80a7a6036 100644
--- a/system/helpers/number_helper.php
+++ b/system/helpers/number_helper.php
@@ -40,26 +40,26 @@ if ( ! function_exists('byte_format'))
{
$CI =& get_instance();
$CI->lang->load('number');
-
+
if ($num >= 1000000000000)
{
- $num = round($num/1099511627776)/10;
- $unit = $CI->lang->line('terabyte_abbr');
+ $num = round($num / 1099511627776, 1);
+ $unit = $CI->lang->line('terabyte_abbr');
}
elseif ($num >= 1000000000)
{
- $num = round($num/107374182)/10;
- $unit = $CI->lang->line('gigabyte_abbr');
+ $num = round($num / 1073741824, 1);
+ $unit = $CI->lang->line('gigabyte_abbr');
}
elseif ($num >= 1000000)
{
- $num = round($num/104857)/10;
- $unit = $CI->lang->line('megabyte_abbr');
+ $num = round($num / 1048576, 1);
+ $unit = $CI->lang->line('megabyte_abbr');
}
elseif ($num >= 1000)
{
- $num = round($num/102)/10;
- $unit = $CI->lang->line('kilobyte_abbr');
+ $num = round($num / 1024, 1);
+ $unit = $CI->lang->line('kilobyte_abbr');
}
else
{