Commit cca8516e authored by Antoine Beaupré's avatar Antoine Beaupré
Browse files

fix quota display scale

Closes: #1211
Patch by: dguedj
parent f5a56fd0
......@@ -48,6 +48,7 @@ while (list($key,$val)=each($qlist)) {
if (($key == 'bw_web' || $key == 'web') && ($q[$key]["t"] > 0)) {
if ($key == 'web') {
$q[$key]["u"] = $q[$key]["u"] * 1024;
$q[$key]["t"] = $q[$key]["t"] * 1024;
}
$usage_percent = (int) ($q[$key]["u"] / $q[$key]["t"] * 100);
......
......@@ -54,7 +54,7 @@ if (!is_array($q)) {
if ($key == 'bw_web') {
echo "&nbsp;</td><td align=\"center\">". format_size($q[$key]["u"]) ."&nbsp;</td><td align=\"center\">". format_size($q[$key]["t"]) ."&nbsp;</td>";
} elseif ($key == 'web') {
echo "&nbsp;</td><td align=\"center\">". format_size($q[$key]["u"] * 1024) . "&nbsp;</td><td align=\"center\">". format_size($q[$key]["t"]) ."&nbsp;</td>";
echo "&nbsp;</td><td align=\"center\">". format_size($q[$key]["u"] * 1024) . "&nbsp;</td><td align=\"center\">". format_size($q[$key]["t"] * 1024) ."&nbsp;</td>";
} else {
echo "&nbsp;</td><td align=\"center\">".$q[$key]["u"]."&nbsp;</td><td align=\"center\">".$q[$key]["t"]."&nbsp;</td>";
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment