Index: branches/5.3.x/core/kernel/utility/debugger.php
===================================================================
diff -u -N -r15911 -r15948
--- branches/5.3.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15911)
+++ branches/5.3.x/core/kernel/utility/debugger.php (.../debugger.php) (revision 15948)
@@ -1,6 +1,6 @@
Data[$data_index];
+
+ switch ($data['debug_type']) {
+ case 'html':
+ if ( strpos($data['html'], 'SQL Total time') !== false ) {
+ return self::ROW_TYPE_SQL;
+ }
+ break;
+
+ case 'error':
+ $error_map = array(
+ 'Fatal Error' => self::ROW_TYPE_ERROR,
+ 'Warning' => self::ROW_TYPE_WARNING,
+ 'Notice' => self::ROW_TYPE_NOTICE,
+ );
+
+ return $error_map[$this->getErrorNameByCode($data['no'])];
+ break;
+
+ case 'exception':
+ return self::ROW_TYPE_ERROR;
+ break;
+
+ case 'profiler':
+ if ( preg_match('/^sql_/', $data['profile_key']) ) {
+ return self::ROW_TYPE_SQL;
+ }
+ break;
+ }
+
+ return self::ROW_TYPE_OTHER;
+ }
+
+ /**
* Returns debugger report window width excluding scrollbar
*
* @return int
@@ -1468,7 +1522,7 @@
$this->appendSession(); // show php session if any
// ensure, that 1st line of debug output always is this one:
- $top_line = '
';
+ $top_line = '';
$this->appendHTML($top_line);
$this->moveToBegin(1);
@@ -1552,7 +1606,10 @@
$lineCount = count($this->Data);
while ( $i < $lineCount ) {
- fwrite($fp, $this->prepareHTML($i) . $this->rowSeparator);
+ $html = $this->prepareHTML($i);
+ $row_type = $this->getRowType($i);
+
+ fwrite($fp, json_encode(Array ('html' => $html, 'row_type' => $row_type)) . $this->rowSeparator);
$i++;
}
@@ -1569,6 +1626,7 @@
$dbg_path = str_replace(FULL_PATH, '', $this->tempFolder);
$debugger_params = Array (
+ 'FilterTypes' => $this->_filterTypes,
'RowSeparator' => $this->rowSeparator,
'ErrorsCount' => (int)$this->getProfilerTotal('error_handling'),
'IsFatalError' => $this->IsFatalError,
@@ -1634,6 +1692,17 @@
return '';
}
+ function getFilterDropdown()
+ {
+ $filter_options = '';
+
+ foreach ( $this->_filterTypes as $filter_type ) {
+ $filter_options .= '';
+ }
+
+ return 'Show: ';
+ }
+
function getMemoryUsed($debugger_start)
{
if ( !isset($this->ProfilerTotals['error_handling']) ) {