diff options
| author | 2016-11-05 21:39:11 +0100 | |
|---|---|---|
| committer | 2016-11-05 21:39:11 +0100 | |
| commit | 8e55aa98034e177d3b8251234100782150f743e8 (patch) | |
| tree | 24433cc1081704dd54e4573184eca29c22d64150 /lib | |
| parent | e66247f01271eb96ac96aad6c0631d9f544ce80c (diff) | |
| parent | 1f37424c09a2b0e6769f8250b65f3652f4e80f14 (diff) | |
Merge pull request #1359 from Alkarex/units-policy
CLI: IEC prefix (binary) for units
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/lib_rss.php | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 143b55bee..fc68a96d3 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -127,6 +127,8 @@ function format_bytes($bytes, $precision = 2, $system = 'IEC') { } elseif ($system === 'SI') { $base = 1000; $units = array('B', 'KB', 'MB', 'GB', 'TB'); + } else { + return format_number($bytes, $precision); } $bytes = max(intval($bytes), 0); $pow = $bytes === 0 ? 0 : floor(log($bytes) / log($base)); |
