diff --git a/ChangeLog b/ChangeLog index e4a79b9dd..f54d59aa5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-11-16 Loïc Chapeaux + * tbl_indexes.php3: merged Michal fix. + 2001-11-15 Loïc Chapeaux * libraries/tbl_dump.php3 : merged a workaround against the IE downloading bug with SSL. diff --git a/tbl_indexes.php3 b/tbl_indexes.php3 index cca988d3a..129890e72 100644 --- a/tbl_indexes.php3 +++ b/tbl_indexes.php3 @@ -223,25 +223,28 @@ else if (!defined('_IDX_INCLUDED_') // Prepares the form values if (!isset($index)) { $index = ''; - } + } + if (!isset($old_index)){ + $old_index = $index; + } if (!isset($index_type)) { $index_type = ''; } - if ($index == '' || !isset($indexes_info[$index])) { + if ($old_index == '' || !isset($indexes_info[$old_index])) { $edited_index_info['Sequences'] = array(); $edited_index_data = array(); for ($i = 1; $i <= $idx_num_fields; $i++) { $edited_index_info['Sequences'][] = $i; $edited_index_data[$i] = array('Column_name' => '', 'Sub_part' => ''); } // end for - if ($index == '' + if ($old_index == '' && !isset($indexes_info['PRIMARY']) && ($index_type == '' || $index_type == 'PRIMARY')) { - $index = 'PRIMARY'; + $old_index = 'PRIMARY'; } } else { - $edited_index_info = $indexes_info[$index]; - $edited_index_data = $indexes_data[$index]; + $edited_index_info = $indexes_info[$old_index]; + $edited_index_data = $indexes_data[$old_index]; if ($edited_index_info['Comment'] == 'FULLTEXT') { $index_type = 'FULLTEXT'; } else if ($index == 'PRIMARY') { @@ -287,7 +290,7 @@ else if (!defined('_IDX_INCLUDED_') } echo "\n"; ?> - +

@@ -428,8 +431,8 @@ else if (!defined('_IDX_INCLUDED_') . ' ' . $index_type . "\n" . ' ' . "\n"; - echo $index_td - . ' ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . "\n" + echo str_replace('">' . "\n", '" align="right">' . "\n", $index_td) + . ' ' . (isset($indexes_info[$index_name]['Cardinality']) ? $indexes_info[$index_name]['Cardinality'] : $strNone) . ' ' . "\n" . ' ' . "\n"; if ($index_name == 'PRIMARY') {