coding standards

This commit is contained in:
Loïc Chapeaux
2002-07-05 12:08:45 +00:00
parent a967a579fc
commit ebb7915de3
3 changed files with 18 additions and 18 deletions

View File

@@ -158,7 +158,7 @@ if (PMA_MYSQL_INT_VERSION >= 32322) {
<input type="hidden" name="lang" value="<?php echo $lang; ?>" /> <input type="hidden" name="lang" value="<?php echo $lang; ?>" />
<input type="hidden" name="db" value="<?php echo $db; ?>" /> <input type="hidden" name="db" value="<?php echo $db; ?>" />
<input type="hidden" name="table" value="<?php echo $table; ?>" /> <input type="hidden" name="table" value="<?php echo $table; ?>" />
<table border="0" cellspacing="0" cellpadding="0"> <table border="0" cellspacing="0" cellpadding="0">
<tr> <tr>
<td> <td>

View File

@@ -1,6 +1,7 @@
<?php <?php
/* $Id$ */ /* $Id$ */
/** /**
* Runs common work * Runs common work
*/ */
@@ -533,7 +534,7 @@ if ($cfg['Server']['relation']) {
<a href="tbl_relation.php3?<?php echo $url_query; ?>"><?php echo $strRelationView; ?></a> <a href="tbl_relation.php3?<?php echo $url_query; ?>"><?php echo $strRelationView; ?></a>
</div> </div>
</li> </li>
<?php <?php
} }
echo "\n"; echo "\n";
?> ?>

View File

@@ -9,30 +9,29 @@
*/ */
// The 'show table' statement works correct since 3.23.03 // The 'show table' statement works correct since 3.23.03
if (PMA_MYSQL_INT_VERSION >= 32303) { if (PMA_MYSQL_INT_VERSION >= 32303) {
$local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\''; $local_query = 'SHOW TABLE STATUS LIKE \'' . PMA_sqlAddslashes($table, TRUE) . '\'';
$table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
$showtable = PMA_mysql_fetch_array($table_info_result); $showtable = PMA_mysql_fetch_array($table_info_result);
$tbl_type = strtoupper($showtable['Type']); $tbl_type = strtoupper($showtable['Type']);
$table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0); $table_info_num_rows = (isset($showtable['Rows']) ? $showtable['Rows'] : 0);
$show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : ''); $show_comment = (isset($showtable['Comment']) ? $showtable['Comment'] : '');
// better logic, thanks to Loic: $tmp = explode(' ', $showtable['Create_options']);
$tmp = explode(' ', $showtable['Create_options']); $tmp_cnt = count($tmp);
$tmp_cnt = count($tmp);
for ($i = 0; $i < $tmp_cnt; $i++) { for ($i = 0; $i < $tmp_cnt; $i++) {
$tmp1 = explode('=', $tmp[$i]); $tmp1 = explode('=', $tmp[$i]);
if (isset($tmp1[1])) { if (isset($tmp1[1])) {
$$tmp1[0] = $tmp1[1]; $$tmp1[0] = $tmp1[1];
} }
} // end for } // end for
unset($tmp1); unset($tmp1);
unset($tmp); unset($tmp);
} else { } else {
$local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table); $local_query = 'SELECT COUNT(*) AS count FROM ' . PMA_backquote($table);
$table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0); $table_info_result = PMA_mysql_query($local_query) or PMA_mysqlDie('', $local_query, '', $err_url_0);
$showtable = array(); $showtable = array();
$table_info_num_rows = PMA_mysql_result($table_info_result, 0, 'count'); $table_info_num_rows = PMA_mysql_result($table_info_result, 0, 'count');
$show_comment = ''; $show_comment = '';
} }
mysql_free_result($table_info_result); mysql_free_result($table_info_result);