bug #2153970 [core] Properly truncate SQL to avoid half of html tags
This commit is contained in:
@@ -15,6 +15,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
|
|||||||
- bug #1914066 [core] ForceSSL generates incorrectly escaped redirections
|
- bug #1914066 [core] ForceSSL generates incorrectly escaped redirections
|
||||||
(this time with the correct fix)
|
(this time with the correct fix)
|
||||||
+ [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika
|
+ [lang] Hungarian update, thanks to Jozsef Tamas Herczeg - dodika
|
||||||
|
- bug #2153970 [core] Properly truncate SQL to avoid half of html tags
|
||||||
|
|
||||||
3.0.0.0 (2008-09-27)
|
3.0.0.0 (2008-09-27)
|
||||||
+ [export] properly handle line breaks for YAML, thanks to Dan Barry -
|
+ [export] properly handle line breaks for YAML, thanks to Dan Barry -
|
||||||
|
@@ -1022,7 +1022,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
|
|||||||
// when the query is large (for example an INSERT of binary
|
// when the query is large (for example an INSERT of binary
|
||||||
// data), the parser chokes; so avoid parsing the query
|
// data), the parser chokes; so avoid parsing the query
|
||||||
$query_too_big = true;
|
$query_too_big = true;
|
||||||
$query_base = nl2br(htmlspecialchars($sql_query));
|
$shortened_query_base = nl2br(htmlspecialchars(substr($sql_query, 0, $cfg['MaxCharactersInDisplayedSQL']) . '[...]'));
|
||||||
} elseif (! empty($GLOBALS['parsed_sql'])
|
} elseif (! empty($GLOBALS['parsed_sql'])
|
||||||
&& $query_base == $GLOBALS['parsed_sql']['raw']) {
|
&& $query_base == $GLOBALS['parsed_sql']['raw']) {
|
||||||
// (here, use "! empty" because when deleting a bookmark,
|
// (here, use "! empty" because when deleting a bookmark,
|
||||||
@@ -1177,7 +1177,7 @@ function PMA_showMessage($message, $sql_query = null, $type = 'notice')
|
|||||||
|
|
||||||
echo '<code class="sql">';
|
echo '<code class="sql">';
|
||||||
if ($query_too_big) {
|
if ($query_too_big) {
|
||||||
echo substr($query_base, 0, $cfg['MaxCharactersInDisplayedSQL']) . '[...]';
|
echo $shortened_query_base;
|
||||||
} else {
|
} else {
|
||||||
echo $query_base;
|
echo $query_base;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user