diff --git a/ChangeLog b/ChangeLog index 5589a836c..058650dcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA + rfe #1186511 [inrerface] Add link to reload navigation frame. + rfe #2936156 [auth] Signon authentication forwards error message through session data. + rfe #2835109 [interface] Move ^1 to the end of message. ++ rfe #854911 [interface] Grey out non applicable actions in structure 3.3.0.0 (not yet released) + rfe #2308632 [edit] Use hex for (var)binary fields, diff --git a/libraries/Index.class.php b/libraries/Index.class.php index ee65ccd28..9572222a6 100644 --- a/libraries/Index.class.php +++ b/libraries/Index.class.php @@ -1,7 +1,7 @@ _type; } + public function getChoice() + { + return $this->_choice; + } + /** * Return a list of all index choices * diff --git a/tbl_structure.php b/tbl_structure.php index f5c34c183..41e90055d 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -111,6 +111,16 @@ require_once './libraries/Index.class.php'; // @todo should be: $server->db($db)->table($table)->primary() $primary = PMA_Index::getPrimary($table, $db); +$columns_with_unique_index = array(); +foreach (PMA_Index::getFromTable($table, $db) as $index) { + if ($index->isUnique() && $index->getChoice() == 'UNIQUE') { + $columns = $index->getColumns(); + foreach ($columns as $column_name => $dummy) { + $columns_with_unique_index[$column_name] = 1; + } + } +} +unset($index, $columns, $column_name, $dummy); // 3. Get fields $fields_rs = PMA_DBI_query('SHOW FULL FIELDS FROM ' . PMA_backquote($table) . ';', null, PMA_DBI_QUERY_STORE); @@ -314,16 +324,17 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { $field_encoded = urlencode($row['Field']); $field_name = htmlspecialchars($row['Field']); + $displayed_field_name = $field_name; // garvin: underline commented fields and display a hover-title (CSS only) $comment_style = ''; if (isset($comments_map[$row['Field']])) { - $field_name = '' . $field_name . ''; + $displayed_field_name = '' . $field_name . ''; } if ($primary && $primary->hasColumn($field_name)) { - $field_name = '' . $field_name . ''; + $displayed_field_name = '' . $field_name . ''; } echo "\n"; ?> @@ -334,7 +345,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { - + > ' . $field_charset . ''); ?> @@ -368,7 +379,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) { hasColumn($field_name))) { echo $titles['NoPrimary'] . "\n"; } else { echo "\n"; @@ -383,7 +394,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {