summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2016-01-19 10:37:20 +0100
committerMorris Jobke <hey@morrisjobke.de>2016-01-19 10:41:12 +0100
commit930555bd5e349cddee9905d83d5435ae3b7a1ea4 (patch)
treea3ef6af8c4ed190915d068d77788bb1ac4e27634
parent80fa6d5731ad563e7439dfc8c94c88afcf2f2fde (diff)
downloadnextcloud-server-930555bd5e349cddee9905d83d5435ae3b7a1ea4.tar.gz
nextcloud-server-930555bd5e349cddee9905d83d5435ae3b7a1ea4.zip
properly use standard
* JEDEC standard - https://en.wikipedia.org/wiki/JEDEC_memory_standards#Unit_prefixes_for_semiconductor_storage_capacity
-rw-r--r--lib/private/helper.php2
-rw-r--r--tests/lib/helper.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php
index 3590eaee612..c387cd40a24 100644
--- a/lib/private/helper.php
+++ b/lib/private/helper.php
@@ -112,7 +112,7 @@ class OC_Helper {
}
$bytes = round($bytes / 1024, 0);
if ($bytes < 1024) {
- return "$bytes kB";
+ return "$bytes KB";
}
$bytes = round($bytes / 1024, 1);
if ($bytes < 1024) {
diff --git a/tests/lib/helper.php b/tests/lib/helper.php
index c2620896157..89a981e6e23 100644
--- a/tests/lib/helper.php
+++ b/tests/lib/helper.php
@@ -21,7 +21,7 @@ class Test_Helper extends \Test\TestCase {
{
return array(
array('0 B', 0),
- array('1 kB', 1024),
+ array('1 KB', 1024),
array('9.5 MB', 10000000),
array('1.3 GB', 1395864371),
array('465.7 GB', 500000000000),
@@ -63,7 +63,7 @@ class Test_Helper extends \Test\TestCase {
function providesComputerFileSize(){
return [
[0.0, "0 B"],
- [1024.0, "1 kB"],
+ [1024.0, "1 KB"],
[1395864371.0, '1.3 GB'],
[9961472.0, "9.5 MB"],
[500041567437.0, "465.7 GB"],