patch #1749705, Allow multibyte characters in number formatting, thanks to garas

This commit is contained in:
Marc Delisle
2007-07-09 19:41:38 +00:00
parent 4456bf82e5
commit 2d9613dfea
29 changed files with 48 additions and 48 deletions

View File

@@ -75,6 +75,8 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
$cfg['MaxCharactersInDisplayedSQL'] $cfg['MaxCharactersInDisplayedSQL']
- bug #1746186 LeftLogoLink fails if set to some external site - bug #1746186 LeftLogoLink fails if set to some external site
. [transformations]: remove "auto-detect" MIME-type that was never implemented . [transformations]: remove "auto-detect" MIME-type that was never implemented
+ [display] patch #1749705, Allow multibyte characters in number formatting,
thanks to garas
2.10.3.0 (not yet released) 2.10.3.0 (not yet released)

View File

@@ -135,9 +135,9 @@ else {
<td align="right"> <td align="right">
<?php <?php
if ($merged_size) { if ($merged_size) {
echo '<i>' . number_format($sts_data['TABLE_ROWS'], 0, $number_decimal_separator, $number_thousands_separator) . '</i>' . "\n"; echo '<i>' . PMA_formatNumber($sts_data['TABLE_ROWS'], 0) . '</i>' . "\n";
} else { } else {
echo number_format($sts_data['TABLE_ROWS'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; echo PMA_formatNumber($sts_data['TABLE_ROWS'], 0) . "\n";
} }
?> ?>
</td> </td>
@@ -218,10 +218,10 @@ else {
?> ?>
<tr> <tr>
<th align="center"> <th align="center">
<?php echo sprintf($strTables, number_format($num_tables, 0, $number_decimal_separator, $number_thousands_separator)); ?> <?php echo sprintf($strTables, PMA_formatNumber($num_tables, 0)); ?>
</th> </th>
<th align="right" nowrap="nowrap"> <th align="right" nowrap="nowrap">
<?php echo number_format($sum_entries, 0, $number_decimal_separator, $number_thousands_separator); ?> <?php echo PMA_formatNumber($sum_entries, 0); ?>
</th> </th>
<th align="center"> <th align="center">
-- --

View File

@@ -8,7 +8,7 @@
$charset = 'iso-8859-2'; $charset = 'iso-8859-2';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); $byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');

View File

@@ -9,7 +9,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); $byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');

View File

@@ -8,7 +8,7 @@
$charset = 'windows-1250'; $charset = 'windows-1250';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); $byteUnits = array('B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');

View File

@@ -8,7 +8,7 @@
$charset = 'iso-8859-1'; $charset = 'iso-8859-1';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et'); $byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et');

View File

@@ -8,7 +8,7 @@
$charset = 'iso-8859-15'; $charset = 'iso-8859-15';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et'); $byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et');

View File

@@ -9,7 +9,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et'); $byteUnits = array('tavua', 'kt', 'Mt', 'Gt', 'Tt', 'Pt', 'Et');

View File

@@ -3,7 +3,7 @@
$charset = 'iso-8859-1'; $charset = 'iso-8859-1';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio'); $byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio');

View File

@@ -3,7 +3,7 @@
$charset = 'iso-8859-15'; $charset = 'iso-8859-15';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio'); $byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio');

View File

@@ -4,7 +4,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio'); $byteUnits = array('o', 'Kio', 'Mio', 'Gio', 'Tio', 'Pio', 'Eio');

View File

@@ -12,7 +12,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left) $text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('ბაიტი', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('ბაიტი', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -5,7 +5,7 @@
$charset = 'iso-8859-2'; $charset = 'iso-8859-2';
$text_dir = 'ltr'; // ('ltr': balr<6C>l jobbra, 'rtl': jobbr<62>l balra) $text_dir = 'ltr'; // ('ltr': balr<6C>l jobbra, 'rtl': jobbr<62>l balra)
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// Byte, Kilo, Mega, Giga, Tera, Peta, Exa r<>vid<69>t<EFBFBD>sei // Byte, Kilo, Mega, Giga, Tera, Peta, Exa r<>vid<69>t<EFBFBD>sei
$byteUnits = array('B<>jt', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('B<>jt', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -6,7 +6,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; // ('ltr': balról jobbra, 'rtl': jobbról balra) $text_dir = 'ltr'; // ('ltr': balról jobbra, 'rtl': jobbról balra)
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// Byte, Kilo, Mega, Giga, Tera, Peta, Exa rövidítései // Byte, Kilo, Mega, Giga, Tera, Peta, Exa rövidítései
$byteUnits = array('Bájt', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('Bájt', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -8,7 +8,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left) $text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('baiti', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('baiti', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -7,7 +7,7 @@
$charset = 'windows-1257'; $charset = 'windows-1257';
$text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left) $text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = '.'; $number_decimal_separator = '.';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('baiti', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('baiti', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -4,8 +4,8 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left) $text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)
$number_thousands_separator = ','; $number_thousands_separator = ' ';
$number_decimal_separator = '.'; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -3,8 +3,8 @@
$charset = 'windows-1257'; $charset = 'windows-1257';
$text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left) $text_dir = 'ltr'; // ('ltr' for left to right, 'rtl' for right to left)
$number_thousands_separator = ','; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = '.'; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -3,7 +3,7 @@
$charset = 'iso-8859-2'; $charset = 'iso-8859-2';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('bajt<6A>w', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('bajt<6A>w', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -4,7 +4,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('bajtów', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('bajtów', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -3,7 +3,7 @@
$charset = 'windows-1250'; $charset = 'windows-1250';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('bajt<6A>w', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('bajt<6A>w', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -7,7 +7,7 @@
$charset = 'iso-8859-2'; $charset = 'iso-8859-2';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -8,7 +8,7 @@
$charset = 'utf-8'; $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -7,7 +7,7 @@
$charset = 'windows-1250'; $charset = 'windows-1250';
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB'); $byteUnits = array('Bajtov', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB');

View File

@@ -8,7 +8,7 @@
$charset = 'iso-8859-1'; $charset = 'iso-8859-1';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = '<EFBFBD>';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); $byteUnits = array('bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');

View File

@@ -9,7 +9,7 @@ $charset = 'utf-8';
$allow_recoding = TRUE; $allow_recoding = TRUE;
$allow_recoding = TRUE; $allow_recoding = TRUE;
$text_dir = 'ltr'; $text_dir = 'ltr';
$number_thousands_separator = ' '; $number_thousands_separator = ' ';
$number_decimal_separator = ','; $number_decimal_separator = ',';
// shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa // shortcuts for Byte, Kilo, Mega, Giga, Tera, Peta, Exa
$byteUnits = array('bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'); $byteUnits = array('bytes', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB');

View File

@@ -1340,9 +1340,9 @@ function PMA_formatByteDown($value, $limes = 6, $comma = 0)
} // end for } // end for
if ($unit != $GLOBALS['byteUnits'][0]) { if ($unit != $GLOBALS['byteUnits'][0]) {
$return_value = number_format($value, $comma, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator']); $return_value = PMA_formatNumber($value, 5, $comma);
} else { } else {
$return_value = number_format($value, 0, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator']); $return_value = PMA_formatNumber($value, 0);
} }
return array($return_value, $unit); return array($return_value, $unit);
@@ -1378,11 +1378,11 @@ function PMA_formatByteDown($value, $limes = 6, $comma = 0)
*/ */
function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false) function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false)
{ {
//number_format is not multibyte safe, str_replace is safe
if ($length === 0) { if ($length === 0) {
return number_format($value, return str_replace(array(',', '.'),
$comma, array($GLOBALS['number_thousands_separator'], $GLOBALS['number_decimal_separator']),
$GLOBALS['number_decimal_separator'], number_format($value, $comma));
$GLOBALS['number_thousands_separator']);
} }
// this units needs no translation, ISO // this units needs no translation, ISO
@@ -1441,10 +1441,10 @@ function PMA_formatNumber($value, $length = 3, $comma = 0, $only_down = false)
} // end for } // end for
} // end if ($value >= 1) elseif (!$only_down && (float) $value !== 0.0) } // end if ($value >= 1) elseif (!$only_down && (float) $value !== 0.0)
$value = number_format($value, //number_format is not multibyte safe, str_replace is safe
$comma, $value = str_replace(array(',', '.'),
$GLOBALS['number_decimal_separator'], array($GLOBALS['number_thousands_separator'], $GLOBALS['number_decimal_separator']),
$GLOBALS['number_thousands_separator']); number_format($value, $comma));
return $sign . $value . ' ' . $unit; return $sign . $value . ' ' . $unit;
} // end of the 'PMA_formatNumber' function } // end of the 'PMA_formatNumber' function

View File

@@ -154,8 +154,6 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
* @uses PMA_DBI_fetch_result() * @uses PMA_DBI_fetch_result()
* @uses PMA_formatNumber() * @uses PMA_formatNumber()
* @uses PMA_formatByteDown() * @uses PMA_formatByteDown()
* @uses $GLOBALS['number_decimal_separator']
* @uses $GLOBALS['number_thousands_separator']
* @uses $GLOBALS['strBufferPoolUsage'] * @uses $GLOBALS['strBufferPoolUsage']
* @uses $GLOBALS['strTotalUC'] * @uses $GLOBALS['strTotalUC']
* @uses $GLOBALS['strInnoDBPages'] * @uses $GLOBALS['strInnoDBPages']
@@ -174,7 +172,7 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
* @uses $GLOBALS['strBufferWriteWaitsInPercent'] * @uses $GLOBALS['strBufferWriteWaitsInPercent']
* @uses join() * @uses join()
* @uses htmlspecialchars() * @uses htmlspecialchars()
* @uses number_format() * @uses PMA_formatNumber()
* @return string html table with stats * @return string html table with stats
*/ */
function getPageBufferpool() function getPageBufferpool()
@@ -281,7 +279,7 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
. ' <td class="value">' . ' <td class="value">'
. ($status['Innodb_buffer_pool_read_requests'] == 0 . ($status['Innodb_buffer_pool_read_requests'] == 0
? '---' ? '---'
: htmlspecialchars(number_format($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" : htmlspecialchars(PMA_formatNumber($status['Innodb_buffer_pool_reads'] * 100 / $status['Innodb_buffer_pool_read_requests'], 3, 2)) . ' %') . "\n"
. '</td>' . "\n" . '</td>' . "\n"
. ' </tr>' . "\n" . ' </tr>' . "\n"
. ' <tr class="even">' . "\n" . ' <tr class="even">' . "\n"
@@ -289,7 +287,7 @@ class PMA_StorageEngine_innodb extends PMA_StorageEngine
. ' <td class="value">' . ' <td class="value">'
. ($status['Innodb_buffer_pool_write_requests'] == 0 . ($status['Innodb_buffer_pool_write_requests'] == 0
? '---' ? '---'
: htmlspecialchars(number_format($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 2, $GLOBALS['number_decimal_separator'], $GLOBALS['number_thousands_separator'])) . ' %') . "\n" : htmlspecialchars(PMA_formatNumber($status['Innodb_buffer_pool_wait_free'] * 100 / $status['Innodb_buffer_pool_write_requests'], 3, 2)) . ' %') . "\n"
. '</td>' . "\n" . '</td>' . "\n"
. ' </tr>' . "\n" . ' </tr>' . "\n"
. ' </tbody>' . "\n" . ' </tbody>' . "\n"

View File

@@ -450,7 +450,7 @@ foreach ($the_tables as $key => $table) {
<tr> <tr>
<td><?php echo ucfirst($strRows); ?></td> <td><?php echo ucfirst($strRows); ?></td>
<td align="right"> <td align="right">
<?php echo number_format($showtable['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo PMA_formatNumber($showtable['Rows'], 0) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
@@ -460,7 +460,7 @@ foreach ($the_tables as $key => $table) {
<tr> <tr>
<td><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td> <td><?php echo ucfirst($strRowLength); ?>&nbsp;&oslash;</td>
<td> <td>
<?php echo number_format($showtable['Avg_row_length'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo PMA_formatNumber($showtable['Avg_row_length'], 0) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php
@@ -480,7 +480,7 @@ foreach ($the_tables as $key => $table) {
<tr> <tr>
<td><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td> <td><?php echo ucfirst($strNext); ?>&nbsp;Autoindex</td>
<td align="right"> <td align="right">
<?php echo number_format($showtable['Auto_increment'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; ?> <?php echo PMA_formatNumber($showtable['Auto_increment'], 0) . "\n"; ?>
</td> </td>
</tr> </tr>
<?php <?php