Index: trunk/kernel/include/debugger.php
===================================================================
diff -u -r3066 -r3648
--- trunk/kernel/include/debugger.php (.../debugger.php) (revision 3066)
+++ trunk/kernel/include/debugger.php (.../debugger.php) (revision 3648)
@@ -12,7 +12,7 @@
if(!defined($const_name)) define($const_name,$const_value);
}
- unset($_REQUEST['debug_host']); // this var messed up whole detection stuff :(
+ unset($_REQUEST['debug_host'], $_REQUEST['debug_fastfile']); // this var messed up whole detection stuff :(
// Detect fact, that this session beeing debugged by Zend Studio
foreach($_REQUEST as $rq_name=>$rq_value)
@@ -61,6 +61,7 @@
var $Data = Array();
var $ProfilerData = Array();
var $ProfilerTotals = Array();
+ var $ProfilerTotalCount = Array();
var $RecursionStack = Array(); // prevent recursion when processing debug_backtrace() function results
var $TraceNextError=false;
@@ -392,7 +393,13 @@
function appendRequest()
{
- $script = $_SERVER['SCRIPT_FILENAME'];
+ if (isset($_SERVER['SCRIPT_FILENAME'])) {
+ $script = $_SERVER['SCRIPT_FILENAME'];
+ }
+ else {
+ $script = $_SERVER['DOCUMENT_ROOT'].$_SERVER['PHP_SELF'];
+ }
+
$this->appendHTML('ScriptName: '.$this->getFileLink($script,1,basename($script)).' ('.dirname($script).')');
$this->appendHTML('DomViewer: ');
@@ -452,11 +459,13 @@
{
if (!isset($this->ProfilerTotals[$total_key])) {
$this->ProfilerTotals[$total_key] = 0;
+ $this->ProfilerTotalCount[$total_key] = 0;
}
if (!isset($value)) {
$value = $this->ProfilerData[$key]['ends'] - $this->ProfilerData[$key]['begins'];
}
$this->ProfilerTotals[$total_key] += $value;
+ $this->ProfilerTotalCount[$total_key]++;
}
function getMoment()
@@ -537,7 +546,7 @@
if( dbg_ConstOn('DBG_SQL_PROFILE') && isset($this->ProfilerTotals['sql']) )
{
- $this->appendHTML('SQL Total time: '.$this->ProfilerTotals['sql']);
+ $this->appendHTML('SQL Total time: '.$this->ProfilerTotals['sql'].' Number of queries: '.$this->ProfilerTotalCount['sql']);
}
if( dbg_ConstOn('DBG_PROFILE_MEMORY') )
@@ -996,7 +1005,10 @@
function memory_get_usage(){ return -1; }
}
+ if( !dbg_ConstOn('DBG_ZEND_PRESENT') )
+ {
$debugger = new Debugger();
+ }
if( dbg_ConstOn('DBG_HANDLE_ERRORS') )
{