diff --git a/ChangeLog b/ChangeLog index 95937d3a8..3c9e89883 100755 --- a/ChangeLog +++ b/ChangeLog @@ -6,7 +6,7 @@ $Id$ $Source$ 2006-04-25 Sebastian Mendel - * db_details_qbe.php: + * db_details_qbe.php, db_printview.php: style upgrade 2006-04-24 Michal Čihař diff --git a/db_printview.php b/db_printview.php index 46d5ae6ca..6e840ae6d 100644 --- a/db_printview.php +++ b/db_printview.php @@ -2,13 +2,13 @@ /* $Id$ */ // vim: expandtab sw=4 ts=4 sts=4: -require_once('./libraries/common.lib.php'); +require_once './libraries/common.lib.php'; /** * Gets the variables sent or posted to this script, then displays headers */ -$print_view = TRUE; -require_once('./libraries/header.inc.php'); +$print_view = true; +require_once './libraries/header.inc.php'; PMA_checkParameters(array('db')); @@ -21,7 +21,7 @@ $err_url = 'db_details.php?' . PMA_generate_common_url($db); /** * Settings for relations stuff */ -require_once('./libraries/relation.lib.php'); +require_once './libraries/relation.lib.php'; $cfgRelation = PMA_getRelationsParam(); /** @@ -30,14 +30,14 @@ $cfgRelation = PMA_getRelationsParam(); */ // staybyte: speedup view on locked tables - 11 June 2001 // Special speedup for newer MySQL Versions (in 4.0 format changed) -if ($cfg['SkipLockedTables'] == TRUE) { +if ($cfg['SkipLockedTables'] == true) { $result = PMA_DBI_query('SHOW OPEN TABLES FROM ' . PMA_backquote($db) . ';'); // Blending out tables in use - if ($result != FALSE && PMA_DBI_num_rows($result) > 0) { + if ($result != false && PMA_DBI_num_rows($result) > 0) { while ($tmp = PMA_DBI_fetch_row($result)) { // if in use memorize tablename if (preg_match('@in_use=[1-9]+@i', $tmp[0])) { - $sot_cache[$tmp[0]] = TRUE; + $sot_cache[$tmp[0]] = true; } } PMA_DBI_free_result($result); @@ -45,7 +45,7 @@ if ($cfg['SkipLockedTables'] == TRUE) { if (isset($sot_cache)) { $result = PMA_DBI_query('SHOW TABLES FROM ' . PMA_backquote($db) . ';', null, PMA_DBI_QUERY_STORE); - if ($result != FALSE && PMA_DBI_num_rows($result) > 0) { + if ($result != false && PMA_DBI_num_rows($result) > 0) { while ($tmp = PMA_DBI_fetch_row($result)) { if (!isset($sot_cache[$tmp[0]])) { $sts_result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ' LIKE \'' . addslashes($tmp[0]) . '\';'); @@ -57,11 +57,12 @@ if ($cfg['SkipLockedTables'] == TRUE) { } PMA_DBI_free_result($result); unset($result); - $sot_ready = TRUE; + $sot_ready = true; } } } } + if (!isset($sot_ready)) { $result = PMA_DBI_query('SHOW TABLE STATUS FROM ' . PMA_backquote($db) . ';'); if (PMA_DBI_num_rows($result) > 0) { @@ -72,7 +73,7 @@ if (!isset($sot_ready)) { unset($res); } } -$num_tables = (isset($tables) ? count($tables) : 0); +$num_tables = isset($tables) ? count($tables) : 0; if ($cfgRelation['commwork']) { $comment = PMA_getComments($db); @@ -84,7 +85,7 @@ if ($cfgRelation['commwork']) { ?>

- +

+ @@ -112,36 +114,36 @@ else { if ($cfg['ShowStats']) { echo ''; } - echo "\n"; ?> + + + $sts_data) { + $odd_row = true; + foreach ($tables as $keyname => $sts_data) { $table = $sts_data['Name']; - $bgcolor = ($i++ % 2) ? $cfg['BgcolorOne'] : $cfg['BgcolorTwo']; - echo "\n"; ?> - - + 0) { @@ -156,7 +158,7 @@ else { $sum_entries += $sts_data['Rows']; } // MyISAM MERGE Table - elseif ($cfg['ShowStats'] && $mergetable == TRUE) { + elseif ($cfg['ShowStats'] && $mergetable == true) { $formated_size = ' - '; $unit = ''; } elseif ($cfg['ShowStats']) { @@ -164,39 +166,35 @@ else { $unit = ''; } ?> - - - - - +
   ' . $strSize . '
+
    + ' . number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . '' . "\n"; } else { echo number_format($sts_data['Rows'], 0, $number_decimal_separator, $number_thousands_separator) . "\n"; } ?> +    +   - + + +
   - + - -- + -- - +  
+ -
 ' . "\n"; +

-require_once('./libraries/footer.inc.php'); + + +