diff --git a/ChangeLog b/ChangeLog index d1af9e63f..cd1088af1 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-08-06 Marc Delisle + * lib.inc.php3, new code from Loic to avoid showing BLOB + when displaying a TEXT field + 2001-08-06 Steve Alberty * index.php3: remove warning under Apache 2.0.23-dev diff --git a/lib.inc.php3 b/lib.inc.php3 index 80c88c815..3784d60d1 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -1007,7 +1007,17 @@ var errorMsg2 = 'numeric == 1) { echo '  ' . $row[$i] . ' ' . "\n"; } else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) { - echo '  [BLOB] ' . "\n"; + // loic1 : mysql_fetch_fields returns BLOB in place of TEXT + // fields type, however TEXT fields must be displayed even + // if $cfgShowBlob is false -> get the true type of the + // fields. + $result_type = mysql_query('SHOW FIELDS FROM ' . backquote($db) . '.' . backquote($primary->table) . ' LIKE \'' . sql_addslashes($primary->name, TRUE) . '\'') or mysql_die(); + $true_field_type = mysql_fetch_array($result_type); + if (eregi('BLOB', $true_field_type['Type'])) { + echo '  [BLOB] ' . "\n"; + } else { + echo '  ' . htmlspecialchars($row[$i]) . ' ' . "\n"; + } } else { echo '  ' . htmlspecialchars($row[$i]) . ' ' . "\n"; }