diff --git a/ChangeLog b/ChangeLog index a7f900b84..4bfa053e0 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,14 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-09-20 Loïc Chapeaux + * main.php3: fixed an error I've done while merging patch #462787. + * config.inc.php3; Documentation.html: added the $cfgShowStats setting and + resorted the core phpMyAdmin settings in a more logical way. + * db_details.php3; db_printview.php3; tbl_properties.php3; + tbl_printview.php3: added the $cfgShowStats setting. + * lang/italian.inc.php3: updated thanks to Pietro Danesi. + 2001-09-19 Marc Delisle * tbl_properties.php3, db_details.php3, lang/*: start to merge new messages with parameters. diff --git a/db_details.php3 b/db_details.php3 index 4ce6abdf8..f05d99bf4 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -139,7 +139,12 @@ else if (MYSQL_INT_VERSION >= 32300) { - + ' . ucfirst($strSize) . ''; + } + echo "\n"; + ?> = 32300) { if (isset($sts_data['Rows'])) { if ($mergetable == FALSE) { - if ($nonisam == FALSE) { + if ($cfgShowStats && $nonisam == FALSE) { $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $sum_size += $tblsize; if ($tblsize > 0) { @@ -209,20 +214,18 @@ else if (MYSQL_INT_VERSION >= 32300) { } else { list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); } - } else { + } else if ($cfgShowStats) { $formated_size = ' - '; $unit = ''; } - if (isset($sts_data['Rows'])) { - $sum_entries += $sts_data['Rows']; - } + $sum_entries += $sts_data['Rows']; } // MyISAM MERGE Table - else if ($mergetable == TRUE) { + else if ($cfgShowStats && $mergetable == TRUE) { $formated_size = ' - '; $unit = ''; } - else { + else if ($cfgShowStats) { $formated_size = 'unknown'; $unit = ''; } @@ -240,11 +243,17 @@ else if (MYSQL_INT_VERSION >= 32300) {    +    - @@ -258,7 +267,9 @@ else if (MYSQL_INT_VERSION >= 32300) { @@ -275,13 +286,21 @@ else if (MYSQL_INT_VERSION >= 32300) { -- + + - + <?php echo $strWithChecked; ?>    diff --git a/db_printview.php3 b/db_printview.php3 index c24fe267c..11051c333 100755 --- a/db_printview.php3 +++ b/db_printview.php3 @@ -89,7 +89,12 @@ else if (MYSQL_INT_VERSION >= 32300) {    - + ' . ucfirst($strSize) . ''; + } + echo "\n"; + ?> = 32300) { if (isset($sts_data['Rows'])) { if ($mergetable == FALSE) { - if ($nonisam == FALSE) { + if ($cfgShowStats && $nonisam == FALSE) { $tblsize = $sts_data['Data_length'] + $sts_data['Index_length']; $sum_size += $tblsize; if ($tblsize > 0) { @@ -124,20 +129,18 @@ else if (MYSQL_INT_VERSION >= 32300) { } else { list($formated_size, $unit) = format_byte_down($tblsize, 3, 0); } - } else { + } else if ($cfgShowStats) { $formated_size = ' - '; $unit = ''; } - if (isset($sts_data['Rows'])) { - $sum_entries += $sts_data['Rows']; - } + $sum_entries += $sts_data['Rows']; } // MyISAM MERGE Table - else if ($mergetable == TRUE) { + else if ($cfgShowStats && $mergetable == TRUE) { $formated_size = ' - '; $unit = ''; } - else { + else if ($cfgShowStats) { $formated_size = 'unknown'; $unit = ''; } @@ -155,10 +158,16 @@ else if (MYSQL_INT_VERSION >= 32300) {    +   - @@ -172,7 +181,9 @@ else if (MYSQL_INT_VERSION >= 32300) { @@ -185,9 +196,17 @@ else if (MYSQL_INT_VERSION >= 32300) { -- + + 0) { * * staybyte - 9 June 2001 */ -$nonisam = FALSE; -if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) { - $nonisam = TRUE; -} -if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - // Gets some sizes - $mergetable = FALSE; - if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { - $mergetable = TRUE; - } - list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); - if ($mergetable == FALSE) { - list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); - } - if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { - list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); - list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); - } else { - list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); - } - list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); - if ($num_rows > 0) { - list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); +if ($cfgShowStats) { + $nonisam = FALSE; + if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) { + $nonisam = TRUE; } + if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { + // Gets some sizes + $mergetable = FALSE; + if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { + $mergetable = TRUE; + } + list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); + if ($mergetable == FALSE) { + list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); + } + if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { + list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); + list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); + } else { + list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); + } + list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); + if ($num_rows > 0) { + list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); + } - // Displays them - ?> + // Displays them + ?>

@@ -301,20 +302,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - - - - - - + if (isset($index_size)) { + echo "\n"; + ?> + + + + + + @@ -325,20 +326,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - + - +
@@ -352,82 +353,83 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - + - + - + - 0) { - echo "\n"; - ?> + 0) { + echo "\n"; + ?>  ø - 0 && $mergetable == FALSE) { - echo "\n"; - ?> + 0 && $mergetable == FALSE) { + echo "\n"; + ?>  ø - +  Autoindex - + - = 32303 && $nonisam == FALSE) + = 32303 && $nonisam == FALSE) +} // end if ($cfgShowStats) /** diff --git a/tbl_properties.php3 b/tbl_properties.php3 index adef9a931..bb1610fd2 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -522,36 +522,37 @@ if ($index_count > 0) { * Displays Space usage and row statistics */ // BEGIN - Calc Table Space - staybyte - 9 June 2001 -$nonisam = FALSE; -if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) { - $nonisam = TRUE; -} -if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - // Gets some sizes - $mergetable = FALSE; - if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { - $mergetable = TRUE; - } - list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); - if ($mergetable == FALSE) { - list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); - } - if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { - list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); - list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); - } else { - list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); - } - list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); - if ($num_rows > 0) { - list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); +if ($cfgShowStats) { + $nonisam = FALSE; + if (isset($showtable['Type']) && !eregi('ISAM|HEAP', $showtable['Type'])) { + $nonisam = TRUE; } + if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { + // Gets some sizes + $mergetable = FALSE; + if (isset($showtable['Type']) && $showtable['Type'] == 'MRG_MyISAM') { + $mergetable = TRUE; + } + list($data_size, $data_unit) = format_byte_down($showtable['Data_length']); + if ($mergetable == FALSE) { + list($index_size, $index_unit) = format_byte_down($showtable['Index_length']); + } + if (isset($showtable['Data_free']) && $showtable['Data_free'] > 0) { + list($free_size, $free_unit) = format_byte_down($showtable['Data_free']); + list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length'] - $showtable['Data_free']); + } else { + list($effect_size, $effect_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); + } + list($tot_size, $tot_unit) = format_byte_down($showtable['Data_length'] + $showtable['Index_length']); + if ($num_rows > 0) { + list($avg_size, $avg_unit) = format_byte_down(($showtable['Data_length'] + $showtable['Index_length']) / $showtable['Rows'], 6, 1); + } - // Displays them - if ($index_count > 0) { - echo '  ' . "\n"; - } - ?> + // Displays them + if ($index_count > 0) { + echo '  ' . "\n"; + } + ?> @@ -567,20 +568,20 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - + - + @@ -591,31 +592,31 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - - + [] - + @@ -628,80 +629,81 @@ if (MYSQL_INT_VERSION >= 32303 && $nonisam == FALSE) { - + - + - + - 0) { - echo "\n"; - ?> + 0) { + echo "\n"; + ?>  ø - 0 && $mergetable == FALSE) { - echo "\n"; - ?> + 0 && $mergetable == FALSE) { + echo "\n"; + ?>  ø - +  Autoindex - + -