Stop showing BLOB if TEXT
This commit is contained in:
@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
|
|||||||
$Id$
|
$Id$
|
||||||
$Source$
|
$Source$
|
||||||
|
|
||||||
|
2001-08-06 Marc Delisle <lem9@users.sourceforge.net>
|
||||||
|
* lib.inc.php3, new code from Loic to avoid showing BLOB
|
||||||
|
when displaying a TEXT field
|
||||||
|
|
||||||
2001-08-06 Steve Alberty <alberty@nepunlabs.de>
|
2001-08-06 Steve Alberty <alberty@nepunlabs.de>
|
||||||
* index.php3: remove warning under Apache 2.0.23-dev
|
* index.php3: remove warning under Apache 2.0.23-dev
|
||||||
|
|
||||||
|
10
lib.inc.php3
10
lib.inc.php3
@@ -1007,10 +1007,20 @@ var errorMsg2 = '<?php echo(str_replace('\'', '\\\'', $GLOBALS['strNotValidNumbe
|
|||||||
if ($primary->numeric == 1) {
|
if ($primary->numeric == 1) {
|
||||||
echo ' <td align="right"> ' . $row[$i] . ' </td>' . "\n";
|
echo ' <td align="right"> ' . $row[$i] . ' </td>' . "\n";
|
||||||
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
|
} else if ($GLOBALS['cfgShowBlob'] == FALSE && eregi('BLOB', $primary->type)) {
|
||||||
|
// 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 ' <td align="right"> [BLOB] </td>' . "\n";
|
echo ' <td align="right"> [BLOB] </td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo ' <td> ' . htmlspecialchars($row[$i]) . ' </td>' . "\n";
|
echo ' <td> ' . htmlspecialchars($row[$i]) . ' </td>' . "\n";
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
echo ' <td> ' . htmlspecialchars($row[$i]) . ' </td>' . "\n";
|
||||||
|
}
|
||||||
} // end for
|
} // end for
|
||||||
// Possibility to have the modify/delete button on the left added
|
// Possibility to have the modify/delete button on the left added
|
||||||
// Benjamin Gandon -- 2000-08-29
|
// Benjamin Gandon -- 2000-08-29
|
||||||
|
Reference in New Issue
Block a user