From cb576daa05a5c84da15ff5f9d5c50d2c784b73e7 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sat, 20 Oct 2007 18:58:04 +0000 Subject: [PATCH] bug #1814463 Wrong database size --- ChangeLog | 1 + libraries/common.lib.php | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcb3ec4f4..5a27a0968 100644 --- a/ChangeLog +++ b/ChangeLog @@ -37,6 +37,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA - bug #1805102 [display] TextareaAutoSelect issues: set this parameter default value to false to help cut&paste from a terminal window; also set focus to the textarea +- bug #1814463 [display] Wrong database size 2.11.1.2 (2007-10-17) - fixed XSS in server_status.php, thanks to Omer Singer, The DigiTrust Group diff --git a/libraries/common.lib.php b/libraries/common.lib.php index a3f3eda83..905b2fbe5 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1302,8 +1302,12 @@ function PMA_formatByteDown($value, $limes = 6, $comma = 0) } // end for if ($unit != $GLOBALS['byteUnits'][0]) { - $return_value = PMA_formatNumber($value, 5, $comma); + // if the unit is not bytes (as represented in current language) + // reformat with max length of 5 + // 4th parameter=true means do not reformat if value < 1 + $return_value = PMA_formatNumber($value, 5, $comma, true); } else { + // do not reformat, just handle the locale $return_value = PMA_formatNumber($value, 0); } @@ -1373,7 +1377,7 @@ function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false) $length = 3 - $comma; } - // check for negativ value to retain sign + // check for negative value to retain sign if ($value < 0) { $sign = '-'; $value = abs($value);