Index: branches/unlabeled/unlabeled-1.59.2/core/kernel/utility/debugger.php =================================================================== diff -u -r5105 -r5566 --- branches/unlabeled/unlabeled-1.59.2/core/kernel/utility/debugger.php (.../debugger.php) (revision 5105) +++ branches/unlabeled/unlabeled-1.59.2/core/kernel/utility/debugger.php (.../debugger.php) (revision 5566) @@ -711,21 +711,28 @@ $this->appendHTML('Grand Total: '.' Mem: '.sprintf("%.4f Kb", ($totals['mem']+$totals_configs['mem'])/1024).' Time: '.sprintf("%.4f", $totals['time']+$totals_configs['time'])); } }*/ - - $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); - while ($i < $lineCount) { - fwrite($fp, $this->prepareHTML($i).$this->rowSeparator); - $i++; + + $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); + while ($i < $lineCount) { + fwrite($fp, $this->prepareHTML($i).$this->rowSeparator); + $i++; + } + fclose($fp); } - fclose($fp); - // let debugger write report and then don't output anything - if ($this->constOn('DBG_SKIP_REPORTING') || $this->constOn('DBG_ZEND_PRESENT')) return ''; + if ($skip_reporting) { + // let debugger write report and then don't output anything + return ''; + } ob_start(); ?>