diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-13 17:22:45 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-09-13 17:22:45 +0200 |
commit | 8c9add4d3292659228b3d0cf009a7945f09f2705 (patch) | |
tree | 585491b93183cee645d3a9aab383837080f3e8f8 /lib | |
parent | 3790cbb493e44e9e089fe6f2966b90cbc2eda161 (diff) | |
download | nextcloud-server-8c9add4d3292659228b3d0cf009a7945f09f2705.tar.gz nextcloud-server-8c9add4d3292659228b3d0cf009a7945f09f2705.zip |
adding TB and GB to OC_Helper::humanFileSize
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helper.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php index 29660b9e1f1..5b9b961756c 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -296,10 +296,17 @@ class OC_Helper { if ($bytes < 1024) { return "$bytes MB"; } + $bytes = round($bytes / 1024, 1); + if ($bytes < 1024) { + return "$bytes GB"; + } + $bytes = round($bytes / 1024, 1); + if ($bytes < 1024) { + return "$bytes TB"; + } - // Wow, heavy duty for owncloud $bytes = round($bytes / 1024, 1); - return "$bytes GB"; + return "$bytes PB"; } /** |