binary fields weren't well displayed in browse mode
This commit is contained in:
@@ -8,7 +8,8 @@ $Source$
|
|||||||
2001-10-14 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-10-14 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* libraries/build_dump.lib.php3, lines 202-203: improved the fix against
|
* libraries/build_dump.lib.php3, lines 202-203: improved the fix against
|
||||||
the bug #469416 (Dumps with binary data dont work mysql).
|
the bug #469416 (Dumps with binary data dont work mysql).
|
||||||
* left.php3: removed unnecessary md5 calls.
|
* libraries/display_tbl.lib.php3, lines 768-780: binary fields weren't
|
||||||
|
well displayed.
|
||||||
|
|
||||||
2001-10-13 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
2001-10-13 Lo<4C>c Chapeaux <lolo@phpheaven.net>
|
||||||
* Documentation.html, lines 504-506: added some words about requirement for
|
* Documentation.html, lines 504-506: added some words about requirement for
|
||||||
|
@@ -748,7 +748,7 @@ if (!defined('__LIB_DISPLAY_TBL__')){
|
|||||||
if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) {
|
if (strlen($row[$primary->name]) > $GLOBALS['cfgLimitChars'] && ($dontlimitchars != 1)) {
|
||||||
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
|
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
|
||||||
}
|
}
|
||||||
// loic1 : displays <cr>/<lf>
|
// loic1: displays <cr>/<lf>
|
||||||
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
|
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
|
||||||
echo ' <td>' . $row[$primary->name] . '</td>' . "\n";
|
echo ' <td>' . $row[$primary->name] . '</td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
@@ -765,8 +765,19 @@ if (!defined('__LIB_DISPLAY_TBL__')){
|
|||||||
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
|
$row[$primary->name] = substr($row[$primary->name], 0, $GLOBALS['cfgLimitChars']) . '...';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// loic1 : displays <cr>/<lf>
|
// loic1: displays special characters from binaries
|
||||||
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
|
$field_flags = mysql_field_flags($dt_result, $i);
|
||||||
|
if (eregi('BINARY', $field_flags)) {
|
||||||
|
$row[$primary->name] = str_replace("\x00", '\0', $row[$primary->name]);
|
||||||
|
$row[$primary->name] = str_replace("\x08", '\b', $row[$primary->name]);
|
||||||
|
$row[$primary->name] = str_replace("\x0a", '\n', $row[$primary->name]);
|
||||||
|
$row[$primary->name] = str_replace("\x0d", '\r', $row[$primary->name]);
|
||||||
|
$row[$primary->name] = str_replace("\x1a", '\Z', $row[$primary->name]);
|
||||||
|
}
|
||||||
|
// loic1: displays <cr>/<lf>
|
||||||
|
else {
|
||||||
|
$row[$primary->name] = ereg_replace("((\015\012)|(\015)|(\012))+", '<br />', htmlspecialchars($row[$primary->name]));
|
||||||
|
}
|
||||||
echo ' <td>' . $row[$primary->name] . '</td>' . "\n";
|
echo ' <td>' . $row[$primary->name] . '</td>' . "\n";
|
||||||
} else {
|
} else {
|
||||||
echo ' <td> </td>' . "\n";
|
echo ' <td> </td>' . "\n";
|
||||||
|
Reference in New Issue
Block a user