Do not break TEXT fields (bug #860160).
This commit is contained in:
@@ -9,6 +9,7 @@ $Source$
|
||||
* libraries/display_tbl.lib.php, libraries/sqlparser.lib.php,
|
||||
libraries/string.lib.php, libraries/dbi/mysql.dbi.lib.php: SQL parser
|
||||
now correctly works with multibyte strings (bug #936161).
|
||||
* libraries/dbi/mysql.dbi.lib.php: Do not break TEXT fields (bug #860160).
|
||||
|
||||
2004-04-28 Michal Cihar <michal@cihar.com>
|
||||
* css/phpmyadmin.css.php: Force <button> to be displayed inline.
|
||||
|
@@ -150,15 +150,10 @@ function PMA_mysql_fetch_array($result, $type = FALSE) {
|
||||
$num = mysql_num_fields($result);
|
||||
$i = 0;
|
||||
for($i = 0; $i < $num; $i++) {
|
||||
$meta = mysql_fetch_field($result);
|
||||
$name = mysql_field_name($result, $i);
|
||||
if (!$meta) {
|
||||
/* No meta information available -> we guess that it should be converted */
|
||||
if (isset($data[$i])) $ret[$i] = PMA_convert_display_charset($data[$i]);
|
||||
if (isset($data[$name])) $ret[PMA_convert_display_charset($name)] = PMA_convert_display_charset($data[$name]);
|
||||
} else {
|
||||
/* Meta information available -> check type of field and convert it according to the type */
|
||||
if ($meta->blob || stristr($meta->type, 'BINARY')) {
|
||||
$flags = mysql_field_flags($result, $i);
|
||||
/* Field is BINARY (either marked manually, or it is BLOB) => do not convert it */
|
||||
if (stristr($flags, 'BINARY')) {
|
||||
if (isset($data[$i])) $ret[$i] = $data[$i];
|
||||
if (isset($data[$name])) $ret[PMA_convert_display_charset($name)] = $data[$name];
|
||||
} else {
|
||||
@@ -166,7 +161,6 @@ function PMA_mysql_fetch_array($result, $type = FALSE) {
|
||||
if (isset($data[$name])) $ret[PMA_convert_display_charset($name)] = PMA_convert_display_charset($data[$name]);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user