Index: trunk/core/kernel/utility/debugger.php
===================================================================
diff -u -N -r6093 -r6428
--- trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 6093)
+++ trunk/core/kernel/utility/debugger.php (.../debugger.php) (revision 6428)
@@ -244,14 +244,14 @@
$div_width['left'] = round((($total - $total_before - $runtime) / $total) * $total_width);
$ret = 'Name: '.$Data['description'].'
';
-
+
if (isset($Data['file'])) {
$ret .= '[Runtime: '.$runtime.'s] [File: '.$Data['file'].']
';
}
else {
$ret .= 'Runtime: '.$runtime.'s
';
}
-
+
$ret .= '
';
$ret .= '';
$ret .= '';
@@ -310,7 +310,7 @@
function print_r(&$array, $return_output = false, $cut_first = -1, $cut_min_length = -1)
{
static $first_line = true, $tab_count = -1;
-
+
if (is_null($array)) {
return 'NULL';
}elseif (!is_array($array)) {
@@ -319,15 +319,15 @@
}
return $array;
}
-
+
$output = '';
-
+
$tab_count++;
$output .= "Array\n".str_repeat(' ', $tab_count)."(\n";
-
+
$tab_count++;
$tabsign = $tab_count ? str_repeat(' ', $tab_count) : '';
-
+
$array_keys = array_keys($array);
foreach ($array_keys as $key) {
@@ -348,11 +348,11 @@
}
$output .= $tabsign.'['.$key.'] = '.$array[$key]."\n";
break;
-
+
case 'NULL':
$output .= $tabsign.'['.$key."] = NULL\n";
break;
-
+
case 'object':
$attribute_names = get_class_vars( get_class($array[$key]) );
if (!$attribute_names) {
@@ -363,7 +363,7 @@
$output .= $tabsign.'['.$key.'] = SKIPPED (class: '.get_class($array[$key]).")\n";
break;
}
-
+
// $attribute_value - default value for this attribute, not used here
foreach ($attribute_names as $attribute_name => $attribute_value) {
if (is_object($array[$key]->$attribute_name)) {
@@ -375,7 +375,7 @@
$output .= $tabsign.'['.$attribute_name.'] = SKIPPED (class: '.$object_class.")\n";
continue;
}
-
+
array_push($this->RecursionStack, $object_class);
$output .= $this->print_r($array[$key]->$attribute_name, true, 50, 200);
array_pop($this->RecursionStack);
@@ -391,30 +391,30 @@
}
}
break;
-
+
default:
$output .= $tabsign.'['.$key.'] unknown = '.gettype($array[$key])."\n";
break;
}
}
-
+
$tab_count--;
$output .= str_repeat(' ', $tab_count).")\n";
-
+
if ($first_line) {
$first_line = false;
$output .= "\n";
}
-
+
$tab_count--;
-
+
if ($return_output) {
return $output;
}
else {
echo $output;
}
-
+
return true;
}
@@ -510,7 +510,7 @@
{
$trace = debug_backtrace();
array_shift($trace);
-
+
$this->Data[] = Array('trace' => $trace, 'debug_type' => 'trace');
}
@@ -661,7 +661,7 @@
$this->ProfilerData[$key]['file'] = $trace_file.':'.$trace_results[$i]['line'];
unset($trace_results);
}
-
+
$this->Data[] = Array('profile_key' => $key, 'debug_type' => 'profiler');
}
@@ -751,7 +751,7 @@
// don't print same report twice (in case if shutdown function used + compression + fatal error)
return '';
}
-
+
$this->profileFinish('script_runtime');
$this->breakOutofBuffering();
@@ -766,12 +766,12 @@
// defined here, because user can define this contant while script is running, not event before debugger is started
$this->safeDefine('DBG_RAISE_ON_WARNINGS', 0);
$this->safeDefine('DBG_TOOLBAR_BUTTONS', 1);
-
+
$this->appendSession(); // show php session if any
// ensure, that 1st line of debug output always is this one:
$top_line = '';
-
+
$this->appendHTML($top_line);
$this->moveToBegin(1);
@@ -822,14 +822,14 @@
$this->appendHTML('Grand Total: '.' Mem: '.sprintf("%.4f Kb", ($totals['mem']+$totals_configs['mem'])/1024).' Time: '.sprintf("%.4f", $totals['time']+$totals_configs['time']));
}
}*/
-
+
$is_ajax = isset($_GET['ajax']) && $_GET['ajax'] == 'yes';
$skip_reporting = $this->constOn('DBG_SKIP_REPORTING') || $this->constOn('DBG_ZEND_PRESENT');
-
+
if ($is_ajax || !$skip_reporting) {
$debug_file = $this->tempFolder.'/debug_'.$this->rowSeparator.'.txt';
if (file_exists($debug_file)) unlink($debug_file);
-
+
$i = 0;
$fp = fopen($debug_file, 'a');
$lineCount = count($this->Data);
@@ -839,13 +839,13 @@
}
fclose($fp);
}
-
+
if ($skip_reporting) {
// let debugger write report and then don't output anything
$this->reportDone = true;
return '';
}
-
+
ob_start();
?>
@@ -946,7 +946,7 @@
break;
}
}
-
+
return '
';
}
@@ -996,7 +996,7 @@
die( $this->breakOutofBuffering(false) . $this->printReport(true) );
}
}
-
+
function breakOutofBuffering($flush = true)
{
$buffer_content = Array();