diff --git a/libraries/Index.class.php b/libraries/Index.class.php index bab0018ab..27bd73da1 100644 --- a/libraries/Index.class.php +++ b/libraries/Index.class.php @@ -438,9 +438,6 @@ class PMA_Index $r .= '
' . __('Action') . ' | '; - } $r .= '' . __('Keyname') . ' | '; $r .= '' . __('Type') . ' | '; $r .= '' . __('Unique') . ' | '; @@ -450,6 +447,9 @@ class PMA_Index $r .= '' . __('Collation') . ' | '; $r .= '' . __('Null') . ' | '; $r .= '' . __('Comment') . ' | '; + if (! $print_mode) { + $r .= '' . __('Action') . ' | '; + } $r .= '||
---|---|---|---|---|---|---|---|---|---|
' - . ' ' . PMA_getIcon('b_edit.png', __('Edit')) . '' - . ' | ' . "\n"; - - $this_params = $GLOBALS['url_params']; - if ($index->getName() == 'PRIMARY') { - $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY'; - $this_params['message_to_show'] = __('The primary key has been dropped'); - $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP PRIMARY KEY'); - } else { - $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP INDEX ' . PMA_backquote($index->getName()); - $this_params['message_to_show'] = sprintf(__('Index %s has been dropped'), $index->getName()); - $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName()); - } - - $r .= ''; - $r .= ''; - $r .= ' ' - . PMA_getIcon('b_drop.png', __('Drop')) . '' - . ' | ' . "\n"; - } - $r .= '' . htmlspecialchars($index->getName()) . ' | '; $r .= '' . htmlspecialchars($index->getType()) . ' | '; $r .= '' . $index->isUnique(true) . ' | '; @@ -513,6 +482,38 @@ class PMA_Index $r .= '' . htmlspecialchars($index->getComments()) . ' | '; } + + if (! $print_mode) { + $this_params = $GLOBALS['url_params']; + $this_params['index'] = $index->getName(); + $r .= '' + . ' ' . PMA_getOnlyIcon('b_edit.png', __('Edit')) . '' + . ' | ' . "\n"; + + $this_params = $GLOBALS['url_params']; + if ($index->getName() == 'PRIMARY') { + $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP PRIMARY KEY'; + $this_params['message_to_show'] = __('The primary key has been dropped'); + $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP PRIMARY KEY'); + } else { + $this_params['sql_query'] = 'ALTER TABLE ' . PMA_backquote($table) . ' DROP INDEX ' . PMA_backquote($index->getName()); + $this_params['message_to_show'] = sprintf(__('Index %s has been dropped'), $index->getName()); + $js_msg = PMA_jsFormat('ALTER TABLE ' . $table . ' DROP INDEX ' . $index->getName()); + } + + $r .= ''; + $r .= ''; + $r .= ' ' + . PMA_getOnlyIcon('b_drop.png', __('Drop')) . '' + . ' | ' . "\n"; + } + $r .= '