From 19d4a1d4883d8b1b000c0f073d039ed7c16d8a9c 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 b83fb62f3e..d2190e3980 100644 --- a/ChangeLog +++ b/ChangeLog @@ -29,6 +29,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 67e7db81dd..b80b02416d 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -1286,8 +1286,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); } @@ -1357,7 +1361,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); -- 2.11.4.GIT