Bug #835854: Wordwrapping mysql error message

This commit is contained in:
Garvin Hicking
2003-11-05 10:21:56 +00:00
parent 47559a4a83
commit e733e4a924
2 changed files with 19 additions and 2 deletions

View File

@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
$Id$
$Source$
2003-11-05 Garvin Hicking <me@supergarv.de>
* libraries/common.lib.php3: Bug #835854. The MySQL-error messages
are now put inside a <code> HTML-container, not <pre>. This allows
wordwrapping to hide vertical scrollbars. Linebreak/Whitespace
formatting has been altered to preserve those.
2003-11-04 Marc Delisle <lem9@users.sourceforge.net>
* Documentation.html: bug 833900, added known limitation in FAQ 3.10
about selecting homonyms on a table without primary key

View File

@@ -503,9 +503,20 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
echo '<p>' . "\n"
. ' ' . $GLOBALS['strMySQLSaid'] . '<br />' . "\n"
. '</p>' . "\n";
echo '<pre>' . "\n"
// The error message will be displayed within a CODE segment.
// To preserve original formatting, but allow wordwrapping, we do a couple of replacements
// Replace all non-single blanks with their HTML-counterpart
$error_message = str_replace(' ', '&nbsp;&nbsp;', $error_message);
// Replace TAB-characters with their HTML-counterpart
$error_message = str_replace("\t", '&nbsp;&nbsp;&nbsp;&nbsp;', $error_message);
// Replace linebreaks
$error_message = nl2br($error_message);
echo '<code>' . "\n"
. $error_message . "\n"
. '</pre>' . "\n";
. '</code><br /><br />' . "\n";
echo PMA_showMySQLDocu('Error-returns', 'Error-returns');