Be consistent on having 1K == 1024

This commit is contained in:
Ermal 2010-12-22 13:48:33 +00:00
parent 9b4e01686d
commit d526314b97

View File

@ -122,20 +122,20 @@ function get_bandwidthtype_scale($type)
{
switch ($type) {
case "Gb":
$factor = 1000 * 1000 * 1000;
$factor = 1024 * 1024 * 1024;
break;
case "Mb":
$factor = 1000 * 1000;
$factor = 1024 * 1024;
break;
case "Kb":
$factor = 1000;
$factor = 1024;
break;
case "b":
default:
$factor = 1;
break;
}
return floatval($factor);
return intval($factor);
}
function get_hfsc_bandwidth($object, $bw)
@ -4004,4 +4004,4 @@ $dn_default_shaper_msg .= "buttons at the bottom represent queue actions and are
$dn_default_shaper_msg .= " </p></strong></span>";
$dn_default_shaper_msg .= "</td></tr>";
?>
?>