From 6388489d4f1f35a798ca12c927bcf939b1b9e0d2 Mon Sep 17 00:00:00 2001 From: Remi Date: Wed, 9 Mar 2016 10:58:19 +0100 Subject: [PATCH] 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) --- bureau/class/m_quota.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bureau/class/m_quota.php b/bureau/class/m_quota.php index 616bcca9..08b9ac00 100644 --- a/bureau/class/m_quota.php +++ b/bureau/class/m_quota.php @@ -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); } }