do not truncate rowcount

This commit is contained in:
Sebastian Mendel
2005-10-27 06:04:43 +00:00
parent 50228bdadb
commit 8f9208e96b
3 changed files with 17 additions and 4 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2005-10-27 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* libraries/common.lib.php::PMA_formatNumber(),
db_details_structure.php: do not truncate rowcount
2005-10-26 Marc Delisle <lem9@users.sourceforge.net>
* lang/french* updates

View File

@@ -348,7 +348,7 @@ foreach ( $tables as $keyname => $sts_data ) {
<?php echo $titles['Drop']; ?></a></td>
<?php } // end if ( ! $table_is_schema ) ?>
<?php if ( isset( $sts_data['Rows'] ) ) { ?>
<td class="value"><?php echo PMA_formatNumber( $display_rows ); ?></td>
<td class="value"><?php echo PMA_formatNumber( $display_rows, 0 ); ?></td>
<?php if (!($cfg['PropertiesNumColumns'] > 1)) { ?>
<td nowrap="nowrap"><?php echo $sts_data['Type']; ?></td>
<?php if ( isset( $collation ) ) { ?>
@@ -390,12 +390,12 @@ if ($cfg['ShowStats']) {
<tbody>
<tr><td></td>
<th align="center" nowrap="nowrap">
<?php echo sprintf( $strTables, PMA_formatNumber( $num_tables ) ); ?>
<?php echo sprintf( $strTables, PMA_formatNumber( $num_tables, 0 ) ); ?>
</th>
<th colspan="<?php echo ( $table_is_schema ? 3 : 6 ) ?>" align="center">
<?php echo $strSum; ?>
</th>
<th class="value"><?php echo PMA_formatNumber( $sum_entries ); ?></th>
<th class="value"><?php echo PMA_formatNumber( $sum_entries, 0 ); ?></th>
<?php
if (!($cfg['PropertiesNumColumns'] > 1)) {
echo ' <th align="center">--</th>' . "\n";

View File

@@ -2194,6 +2194,8 @@ window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFor
/**
* Formats $value to the given length and appends SI prefixes
* $comma is not substracted from the length
* with a $length of 0 no truncation occurs, number is only formated
* to the current locale
* <code>
* echo PMA_formatNumber( 123456789, 6 ); // 123,457 k
* echo PMA_formatNumber( -123456789, 4, 2 ); // -123.46 M
@@ -2212,9 +2214,16 @@ window.parent.updateTableTitle( '<?php echo $uni_tbl; ?>', '<?php echo PMA_jsFor
* @access public
*
* @author staybyte, sebastian mendel
* @version 1.0.3 - 2005-09-16
* @version 1.1.0 - 2005-10-27
*/
function PMA_formatNumber( $value, $length = 3, $comma = 0, $only_down = false ) {
if ( $length === 0 ) {
return number_format( $value,
$comma,
$GLOBALS['number_decimal_separator'],
$GLOBALS['number_thousands_separator'] );
}
// this units needs no translation, ISO
$units = array(
-8 => 'y',