bug #3403165 [interface] Collation not displayed for long enum fields

This commit is contained in:
Madhura Jayaratne
2011-09-10 10:47:37 +05:30
parent 7e7e55b953
commit 4232fcd458
2 changed files with 4 additions and 0 deletions

View File

@@ -4,6 +4,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

View File

@@ -245,6 +245,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
$type = $row['Type'];
$extracted_fieldspec = PMA_extractFieldSpec($row['Type']);
$truncated = false;
if ('set' == $extracted_fieldspec['type'] || 'enum' == $extracted_fieldspec['type']) {
$type = $extracted_fieldspec['type'] . '(' .
str_replace("','", "', '", $extracted_fieldspec['spec_in_brackets']) . ')';
@@ -252,6 +253,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
// for the case ENUM('–','“')
$type = htmlspecialchars($type);
if(strlen($type) > $GLOBALS['cfg']['LimitChars']) {
$truncated = true;
$type = '<abbr title="' . $type . '">' . substr($type, 0, $GLOBALS['cfg']['LimitChars']) . '</abbr>';
}
@@ -292,6 +294,7 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
|| substr($type, 0, 8) == 'longtext'
|| substr($type, 0, 3) == 'set'
|| substr($type, 0, 4) == 'enum'
|| ($truncated && substr($type, 13, 4) == 'enum')
) && !$binary) {
if (strpos($type, ' character set ')) {
$type = substr($type, 0, strpos($type, ' character set '));