From d0d5bd2d38118d981abd1bf125405df85eb33da3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Chapeaux?= Date: Tue, 4 Sep 2001 17:55:48 +0000 Subject: [PATCH] started merging patch #444128 (display & dump index length) --- ChangeLog | 6 +++++- db_details.php3 | 9 ++++++++- tbl_properties.php3 | 23 +++++++++++++++++++---- 3 files changed, 32 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8c67908fc..f456c6a58 100755 --- a/ChangeLog +++ b/ChangeLog @@ -17,8 +17,12 @@ $Source$ Pietro Danesi . * tbl_alter.php3, lines 9-11: fixed a js error. * header.inc.php3: merged an improved version of the patch #446292 - show - current db/table info in the title (except for NN4). + current db/table info in the title (except for NN4). Thanks to + Alexander Kulikov (kaa348 at users.sourceforge.net). * lang/french.inc.php3: fixed a typo. + * db_details.php3, tbl_properties.php3: started merging patch #444128 + (display & dump index length) submitted by + Marcus Börger (helly at users.sourceforge.net). 2001-09-03 Loïc Chapeaux * lang/czech-iso.inc.php3 & czech-win1250.inc.php3: updated thanks to diff --git a/db_details.php3 b/db_details.php3 index ed49e137f..ef7c75622 100755 --- a/db_details.php3 +++ b/db_details.php3 @@ -117,6 +117,7 @@ else if (MYSQL_INT_VERSION >= 32300 && isset($tbl_cache)) {    + = 32300 && isset($tbl_cache)) { } ?> + +    +    @@ -247,13 +251,16 @@ else if (MYSQL_INT_VERSION >= 32300 && isset($tbl_cache)) { + + -- + - + <?php echo $strWithChecked; ?>    diff --git a/tbl_properties.php3 b/tbl_properties.php3 index 1a1e496ba..5fff1652e 100755 --- a/tbl_properties.php3 +++ b/tbl_properties.php3 @@ -166,10 +166,12 @@ else { $local_query = 'SHOW KEYS FROM ' . backquote($table); $result = mysql_query($local_query) or mysql_die('', $local_query); $primary = ''; +$pk_array = array(); while($row = mysql_fetch_array($result)) { $ret_keys[] = $row; if ($row['Key_name'] == 'PRIMARY') { $primary .= $row['Column_name'] . ', '; + $pk_array[$row['Column_name']] = 1; } } @@ -265,6 +267,10 @@ while ($row = mysql_fetch_array($result)) { } else { $row['Default'] = htmlspecialchars($row['Default']); } + $field_name = htmlspecialchars($row['Field']); + if (isset($pk_array[$row['Field']])) { + $field_name = '' . $field_name . ''; + } echo "\n"; ?> @@ -279,7 +285,7 @@ while ($row = mysql_fetch_array($result)) { } echo "\n"; ?> -   +   >   @@ -376,6 +382,14 @@ if ($index_count > 0) { -' . $row['Seq_in_index'] . '-'; + } else { + $key_name = htmlspecialchars($row['Key_name']); + } + if (!isset($row['Sub_part'])) { + $row['Sub_part'] = ''; + } if ($row['Key_name'] == 'PRIMARY') { $sql_query = urlencode('ALTER TABLE ' . backquote($table) . ' DROP PRIMARY KEY'); $js_msg = 'ALTER TABLE ' . js_format($table) . ' DROP PRIMARY KEY'; @@ -388,9 +402,10 @@ if ($index_count > 0) { echo "\n"; ?> - - - + + + +   " onclick="return confirmLink(this, '')">