diff --git a/ChangeLog b/ChangeLog index b76d296c1c..e78cf44c83 100644 --- a/ChangeLog +++ b/ChangeLog @@ -52,6 +52,7 @@ phpMyAdmin - ChangeLog 3.4.6.0 (not yet released) - patch #3404173 InnoDB comment display with tooltips/aliases - bug #3404886 [navi] Edit SQL statement after error +- bug #3403165 [interface] Collation not displayed for long enum fields 3.4.5.0 (not yet released) - bug #3375325 [interface] Page list in navigation frame looks odd diff --git a/tbl_structure.php b/tbl_structure.php index e86636cf13..15771110e5 100644 --- a/tbl_structure.php +++ b/tbl_structure.php @@ -260,20 +260,23 @@ foreach ($fields as $row) { // for the case ENUM('–','“') $type = htmlspecialchars($type); // in case it is too long + $start = 0; if (strlen($type) > $GLOBALS['cfg']['LimitChars']) { + $start = 13; $type = '' . substr($type, 0, $GLOBALS['cfg']['LimitChars']) . ''; } unset($field_charset); - if ((substr($type, 0, 4) == 'char' - || substr($type, 0, 7) == 'varchar' - || substr($type, 0, 4) == 'text' - || substr($type, 0, 8) == 'tinytext' - || substr($type, 0, 10) == 'mediumtext' - || substr($type, 0, 8) == 'longtext' - || substr($type, 0, 3) == 'set' - || substr($type, 0, 4) == 'enum' - ) && !$extracted_fieldspec['binary']) { + if ((substr($type, $start, 4) == 'char' + || substr($type, $start, 7) == 'varchar' + || substr($type, $start, 4) == 'text' + || substr($type, $start, 8) == 'tinytext' + || substr($type, $start, 10) == 'mediumtext' + || substr($type, $start, 8) == 'longtext' + || substr($type, $start, 3) == 'set' + || substr($type, $start, 4) == 'enum') + && !$extracted_fieldspec['binary'] + ) { if (strpos($type, ' character set ')) { $type = substr($type, 0, strpos($type, ' character set ')); }