diff --git a/plugins/system/debug/debug.php b/plugins/system/debug/debug.php index 7a02945885fd0..9d39523d999b5 100644 --- a/plugins/system/debug/debug.php +++ b/plugins/system/debug/debug.php @@ -901,9 +901,17 @@ protected function displayQueries() // Compute the query time. $queryTime = ($timings[$id * 2 + 1] - $timings[$id * 2]) * 1000; - // Timing. Formats the output for the query time with EXPLAIN query results as tooltip. - $htmlTiming = '
' - . JText::sprintf('PLG_DEBUG_QUERY_TIME', sprintf('%.2f ms', $timing[$id]['0'])); + // Timing + // Formats the output for the query time with EXPLAIN query results as tooltip: + $htmlTiming = '
'; + $htmlTiming .= JText::sprintf( + 'PLG_DEBUG_QUERY_TIME', + sprintf( + '%.2f ms', + $info[$id]->class, + $timing[$id]['0'] + ) + ); if ($timing[$id]['1']) { @@ -960,8 +968,7 @@ protected function displayQueries() } $htmlResultsReturned = '' . (int) $resultsReturned . ''; - $htmlTiming .= ' ' . '' - . JText::sprintf('PLG_DEBUG_ROWS_RETURNED_BY_QUERY', $htmlResultsReturned) . ''; + $htmlTiming .= ' ' . JText::sprintf('PLG_DEBUG_ROWS_RETURNED_BY_QUERY', $htmlResultsReturned) . ''; } } @@ -1001,8 +1008,8 @@ protected function displayQueries() if (!$this->linkFormat) { - $htmlCallStack .= '
[' - . JText::_('PLG_DEBUG_LINK_FORMAT') . ']
'; + $htmlCallStack .= '
['; + $htmlCallStack .= JText::_('PLG_DEBUG_LINK_FORMAT') . ']
'; } } @@ -1162,11 +1169,11 @@ protected function displayQueries() } /** - * Render bars. + * Render the bars. * - * @param array &$bars Array of bar data. - * @param string $class Optional class for items. - * @param integer $id Id of the bar to highlight. + * @param array &$bars Array of bar data + * @param string $class Optional class for items + * @param integer $id Id if the bar to highlight * * @return string * @@ -1198,18 +1205,18 @@ protected function renderBars(&$bars, $class = '', $id = null) $tip = JHtml::tooltipText($bar->tip, '', 0); } - $html[] = ''; + $html[] = ''; } return '
' . implode('', $html) . '
'; } /** - * Render array as HTML table. + * Render an HTML table based on a multi-dimensional array. * - * @param array $table Array to be rendered. - * @param boolean &$hasWarnings Changes value to true if warnings are displayed, otherwise untouched. + * @param array $table An array of tabular data. + * @param boolean &$hasWarnings Changes value to true if warnings are displayed, otherwise untouched * * @return string * @@ -1284,9 +1291,10 @@ protected function tableToHtml($table, &$hasWarnings) { if ($td === 'NULL') { - // Displays query parts which don't use a key with warning. - $html[] = '' . '' - . JText::_('PLG_DEBUG_WARNING_NO_INDEX') . '' . ''; + // Displays query parts which don't use a key with warning: + $html[] = '' . '' . + JText::_('PLG_DEBUG_WARNING_NO_INDEX') . '' . ''; $hasWarnings = true; } else @@ -1301,10 +1309,14 @@ protected function tableToHtml($table, &$hasWarnings) // Replace spaces with   (non-breaking spaces) for less tall tables displayed. $htmlTd = preg_replace('/([^;]) /', '\1 ', $htmlTd); - // Displays warnings for "Using filesort". - $htmlTdWithWarnings = str_replace('Using filesort', '' . JText::_('PLG_DEBUG_WARNING_USING_FILESORT') . '', $htmlTd - ); + // Displays warnings for "Using filesort": + $htmlTdWithWarnings = str_replace( + 'Using filesort', + '' . + JText::_('PLG_DEBUG_WARNING_USING_FILESORT') . '', + $htmlTd + ); if ($htmlTdWithWarnings !== $htmlTd) { diff --git a/plugins/system/debug/debug.xml b/plugins/system/debug/debug.xml index dfbe7bb803007..aa2fd7240677c 100644 --- a/plugins/system/debug/debug.xml +++ b/plugins/system/debug/debug.xml @@ -98,7 +98,7 @@ description="PLG_DEBUG_FIELD_LOG_CATEGORIES_DESC" /> -