aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2009-04-18 18:40:15 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2009-04-18 18:40:15 +0000
commit9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9 (patch)
treeb22ed96d99f7a7b92b2371bad08a96c108af8d6a /phpBB/includes/functions.php
parent59763841b3b871dbe378f61f98fc8dfb5faec76a (diff)
downloadforums-9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9.tar
forums-9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9.tar.gz
forums-9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9.tar.bz2
forums-9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9.tar.xz
forums-9512b82e1d2779ab39b46424cd9ad8f4b5f6c0f9.zip
#43755 - also return GiB sizes for get_formatted_filesize(), patch by nickvergessen
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9474 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r--phpBB/includes/functions.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 832738395f..be5e661d44 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -236,6 +236,11 @@ function get_formatted_filesize($bytes, $add_size_lang = true)
{
global $user;
+ if ($bytes >= pow(2, 30))
+ {
+ return ($add_size_lang) ? round($bytes / 1024 / 1024 / 1024, 2) . ' ' . $user->lang['GIB'] : round($bytes / 1024 / 1024 / 1024, 2);
+ }
+
if ($bytes >= pow(2, 20))
{
return ($add_size_lang) ? round($bytes / 1024 / 1024, 2) . ' ' . $user->lang['MIB'] : round($bytes / 1024 / 1024, 2);
@@ -3240,6 +3245,7 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
$msg_text = str_replace(array(phpbb_realpath($phpbb_root_path), '\\'), array('', '/'), $msg_text);
echo '<b>[phpBB Debug] PHP Notice</b>: in file <b>' . $errfile . '</b> on line <b>' . $errline . '</b>: <b>' . $msg_text . '</b><br />' . "\n";
+ // echo '<br /><br />BACKTRACE<br />' . get_backtrace() . '<br />' . "\n";
}
return;