patch #2715417 [interface] Fixed truncation of enum/set values containing parenthesis

This commit is contained in:
Herman van Rink
2009-04-04 13:06:20 +00:00
parent f0eb21fba8
commit 70f6003ce0
2 changed files with 3 additions and 1 deletions

View File

@@ -2559,7 +2559,7 @@ function PMA_printable_bit_value($value, $length) {
function PMA_extractFieldSpec($fieldspec) {
$first_bracket_pos = strpos($fieldspec, '(');
if ($first_bracket_pos) {
$spec_in_brackets = chop(substr($fieldspec, $first_bracket_pos + 1, (strpos($fieldspec, ')') - $first_bracket_pos - 1)));
$spec_in_brackets = chop(substr($fieldspec, $first_bracket_pos + 1, (strrpos($fieldspec, ')') - $first_bracket_pos - 1)));
// convert to lowercase just to be sure
$type = strtolower(chop(substr($fieldspec, 0, $first_bracket_pos)));
} else {