change quota percentage calculation

This commit is contained in:
Klaus Leithoff 2013-10-07 12:35:38 +00:00
parent 35167898cd
commit 78855fa7b7
2 changed files with 11 additions and 1 deletions

View File

@ -4919,6 +4919,16 @@ class mail_bo
{
$bytes /= 1024;
$type = 'M';
if ($bytes / 1024 > 1)
{
$bytes *= 10;
settype($bytes, 'integer');
$bytes /= 10;
$bytes /= 1024;
$type = 'G';
}
}
if ($bytes < 10)

View File

@ -2065,7 +2065,7 @@ unset($query['actions']);
}
$quota['class'] = $quotaBG;
$quota['text'] = $quotaText;
$quota['percent'] = (string)($_usage/$_limit*100);
$quota['percent'] = (string)round(($_usage*100)/$_limit);//($_usage/$_limit*100);
return $quota;
}