Merge remote-tracking branch 'origin/itop-carbon' into develop

# Conflicts:
#	application/utils.inc.php
#	setup/ajax.dataloader.php
This commit is contained in:
Pierre Goiffon
2019-10-22 18:27:13 +02:00
6 changed files with 204 additions and 38 deletions

View File

@@ -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';
}