aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB')
-rw-r--r--phpBB/includes/functions.php9
-rw-r--r--phpBB/language/en/common.php2
2 files changed, 10 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 804d89d1a2..3a5b100515 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -229,7 +229,8 @@ function phpbb_gmgetdate($time = false)
/**
* Return formatted string for filesizes
*
-* @param int $value filesize in bytes
+* @param mixed $value filesize in bytes
+* (non-negative number; int, float or string)
* @param bool $string_only true if language string should be returned
* @param array $allowed_units only allow these units (data array indexes)
*
@@ -241,6 +242,12 @@ function get_formatted_filesize($value, $string_only = true, $allowed_units = fa
global $user;
$available_units = array(
+ 'tb' => array(
+ 'min' => 1099511627776, // pow(2, 40)
+ 'index' => 4,
+ 'si_unit' => 'TB',
+ 'iec_unit' => 'TIB',
+ ),
'gb' => array(
'min' => 1073741824, // pow(2, 30)
'index' => 3,
diff --git a/phpBB/language/en/common.php b/phpBB/language/en/common.php
index 4300ef431a..7ce3b5d2e6 100644
--- a/phpBB/language/en/common.php
+++ b/phpBB/language/en/common.php
@@ -605,9 +605,11 @@ $lang = array_merge($lang, array(
'SUBJECT' => 'Subject',
'SUBMIT' => 'Submit',
+ 'TB' => 'TB',
'TERMS_USE' => 'Terms of use',
'TEST_CONNECTION' => 'Test connection',
'THE_TEAM' => 'The team',
+ 'TIB' => 'TiB',
'TIME' => 'Time',
'TIMEOUT_PROCESSING_REQ' => 'Request timed out.',