Tracking report should obey MaxCharactersInDisplayedSQL

This commit is contained in:
Marc Delisle
2010-04-26 16:38:20 -04:00
parent bd4e0b83d8
commit 06c8fa0abb
2 changed files with 11 additions and 4 deletions

View File

@@ -417,8 +417,11 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
<?php
$style = 'odd';
foreach ($data['ddlog'] as $entry) {
$parsed_sql = PMA_SQP_parse($entry['statement']);
$statement = PMA_formatSql($parsed_sql);
if (strlen($entry['statement']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$statement = substr($entry['statement'], 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) . '[...]';
} else {
$statement = PMA_formatSql(PMA_SQP_parse($entry['statement']));
}
$timestamp = strtotime($entry['date']);
if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to &&
@@ -465,8 +468,11 @@ if (isset($_REQUEST['report']) || isset($_REQUEST['report_export'])) {
<?php
$style = 'odd';
foreach ($data['dmlog'] as $entry) {
$parsed_sql = PMA_SQP_parse($entry['statement']);
$statement = PMA_formatSql($parsed_sql);
if (strlen($entry['statement']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
$statement = substr($entry['statement'], 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) . '[...]';
} else {
$statement = PMA_formatSql(PMA_SQP_parse($entry['statement']));
}
$timestamp = strtotime($entry['date']);
if ($timestamp >= $filter_ts_from && $timestamp <= $filter_ts_to &&