Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-01-16 22:04:50 +0400
committerRobin Appelman <icewind@owncloud.com>2013-01-16 22:04:50 +0400
commit5445b94416f50bb040e7426cadfa458607893f07 (patch)
tree337b12362333030e0ebda37acb7f25073723a7af /lib/helper.php
parent7debfac0dc8f602168d8db480cfd4757b4d612b0 (diff)
parent1d57a2e2a9d5e392bb1061479543cd1dec860c4b (diff)
merge master into filesystem
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 7aede047974..6b1eaa4e6ee 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -223,6 +223,10 @@ class OC_Helper {
* Makes 2048 to 2 kB.
*/
public static function humanFileSize( $bytes ) {
+ if( $bytes < 0 ) {
+ $l = OC_L10N::get('lib');
+ return $l->t("couldn't be determined");
+ }
if( $bytes < 1024 ) {
return "$bytes B";
}
@@ -549,7 +553,7 @@ class OC_Helper {
fclose($fh);
return $file;
}
-
+
/**
* create a temporary folder with an unique filename
* @return string