bug fix: Quota use was different when switching language

use of str_pad inside get_size_unit() was removing decimal part due to localization issues (coma separator instead of dot)
This commit is contained in:
Remi 2016-03-09 10:58:19 +01:00
parent cb381b6d63
commit 6388489d4f
1 changed files with 1 additions and 1 deletions

View File

@ -576,7 +576,7 @@ class m_quota {
$units = array(1073741824 => _("GB"), 1048576 => _("MB"), 1024 => _("KB"), 0 => _("B"));
foreach ($units as $value => $unit) {
if ($size >= $value) {
$size = str_pad(round($size / ($value ? $value : 1), 1), 5, ' ', STR_PAD_LEFT);
$size=$size/($value?$value:1);
return array('size' => $size, 'unit' => $unit);
}
}