allow engineering units (e.g. 400M, 1G) as service class limits

This commit is contained in:
redmatrix
2016-04-28 21:02:27 -07:00
parent 30a6ae3daa
commit bb96f44861
9 changed files with 16 additions and 13 deletions

View File

@@ -1825,7 +1825,7 @@ function lang_selector() {
}
function return_bytes ($size_str) {
function engr_units_to_bytes ($size_str) {
switch (substr ($size_str, -1)) {
case 'M': case 'm': return (int)$size_str * 1048576;
case 'K': case 'k': return (int)$size_str * 1024;