mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-21 01:28:47 +02:00
Merge remote-tracking branch 'origin/itop-carbon' into develop
# Conflicts: # application/utils.inc.php # setup/ajax.dataloader.php
This commit is contained in:
@@ -596,11 +596,13 @@ class utils
|
||||
public static function BytesToFriendlyFormat($value)
|
||||
{
|
||||
$sReturn = '';
|
||||
$iPrecision = 0;
|
||||
// Kilobytes
|
||||
if ($value >= 1024)
|
||||
{
|
||||
$sReturn = 'K';
|
||||
$value = $value / 1024;
|
||||
$iPrecision = 1;
|
||||
}
|
||||
// Megabytes
|
||||
if ($value >= 1024)
|
||||
@@ -621,7 +623,7 @@ class utils
|
||||
$value = $value / 1024;
|
||||
}
|
||||
|
||||
$value = round($value, 1);
|
||||
$value = round($value, $iPrecision);
|
||||
|
||||
return $value . '' . $sReturn . 'B';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user