Skip to content

Commit

Permalink
Use new truncating code
Browse files Browse the repository at this point in the history
  • Loading branch information
nijel committed Aug 6, 2013
1 parent 32b33a9 commit 2711010
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 29 deletions.
12 changes: 1 addition & 11 deletions libraries/Util.class.php
Expand Up @@ -640,17 +640,7 @@ public static function mysqlDie(
} elseif (empty($the_query) || (trim($the_query) == '')) {
$formatted_sql = '';
} else {
if (strlen($the_query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$formatted_sql = htmlspecialchars(
substr(
$the_query, 0,
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
)
)
. '[...]';
} else {
$formatted_sql = self::formatSql($the_query);
}
$formatted_sql = self::formatSql($the_query, true);
}
// ---
$error_msg .= "\n" . '<!-- PMA-SQL-ERROR -->' . "\n";
Expand Down
20 changes: 2 additions & 18 deletions tbl_tracking.php
Expand Up @@ -561,15 +561,7 @@ function PMA_filterTracking(

$style = 'odd';
foreach ($data['ddlog'] as $entry) {
if (strlen($entry['statement']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$statement = substr(
$entry['statement'],
0,
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
) . '[...]';
} else {
$statement = PMA_Util::formatSql($entry['statement']);
}
$statement = PMA_Util::formatSql($entry['statement'], true);
$timestamp = strtotime($entry['date']);

if ($timestamp >= $filter_ts_from
Expand Down Expand Up @@ -628,15 +620,7 @@ function PMA_filterTracking(

$style = 'odd';
foreach ($data['dmlog'] as $entry) {
if (strlen($entry['statement']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$statement = substr(
$entry['statement'],
0,
$GLOBALS['cfg']['MaxCharactersInDisplayedSQL']
) . '[...]';
} else {
$statement = PMA_Util::formatSql($entry['statement']);
}
$statement = PMA_Util::formatSql($entry['statement'], true);
$timestamp = strtotime($entry['date']);

if ($timestamp >= $filter_ts_from
Expand Down

0 comments on commit 2711010

Please sign in to comment.