// Displays all SQL queries with num rows, affected rows and timings
function displayDebugSqls () {
// Walk through all SQLs
- $OUT = ''; $SW = 2; $i = 1;
+ $OUT = ''; $i = 1;
foreach ($GLOBALS['debug_sqls'] as $content) {
// Translate/add some data
- $content['sw'] = $SW;
$content['i'] = $i;
$content['timing'] = translateComma($content['timing'] * 1000);
// Load row template
$OUT .= loadTemplate('admin_other_sqls_row', true, $content);
- // Switch color
- $SW = 3 - $SW; $i++;
+ // Count one up
+ $i++;
} // END - foreach
// Load main template
// Filter for debugging SQLs
function FILTER_DISPLAY_DEBUG_SQL () {
// Shall we display SQL queries?
- if ((isAdmin()) && (isExtensionInstalledAndNewer('other', '0.2.2')) && (getConfig('display_debug_sqls') == 'Y') && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
+ if ((isAdmin()) && (isDisplayDebugSqlEnabled()) && (!isGetRequestParameterSet('frame')) && ($GLOBALS['header_sent'] == 2)) {
// Then display it here
displayDebugSqls();
} // END - if