Check in a version of the debug toolkit that I've added debug prints to. They're commented out at the moment, but may come in handy later.

git-svn-id: file:///svn-source/pmgr/branches/ledger_transactions_20090605/site@102 97e9348a-65ac-dc4b-aefc-98561f571b83
This commit is contained in:
abijah
2009-06-13 03:46:17 +00:00
parent 8cdf061fca
commit cbdd198be5

View File

@@ -50,6 +50,10 @@ class DebugView extends DoppelGangerView {
* @access protected
*/
function _render($___viewFn, $___dataForView, $loadHelpers = true, $cached = false) {
/* pr(array('function' => 'DebugView::_render', */
/* 'args' => compact('__viewFn', '__dataForView', 'loadHelpers'), */
/* 'this-output-len' => strlen($this->output), */
/* )); */
if (isset($this->_oldExtension) && strstr($___viewFn, '.debug_view')) {
$___viewFn = substr($___viewFn, 0, -10) . $this->_oldExtension;
}
@@ -62,6 +66,10 @@ class DebugView extends DoppelGangerView {
if (!isset($___dataForView['disableTimer'])) {
DebugKitDebugger::stopTimer('render_' . basename($___viewFn));
}
/* pr(array('function' => 'DebugView::_render', */
/* 'out-len' => strlen($out), */
/* 'this-output-len' => strlen($this->output), */
/* 'return' => $out ? 'not-empty' : 'empty')); */
return $out;
}
@@ -76,16 +84,29 @@ class DebugView extends DoppelGangerView {
* @return string Rendered Element
*/
function render($action = null, $layout = null, $file = null) {
/* pr(array('function' => 'DebugView::render', */
/* 'args' => compact('action', 'layout', 'file'), */
/* 'this-output-len' => strlen($this->output), */
/* )); */
DebugKitDebugger::startTimer('viewRender', __('Rendering View', true));
$out = parent::render($action, $layout, $file);
/* pr(array('function' => 'DebugView::render', */
/* 'checkpoint' => 'parent::render', */
/* 'out' => $out ? 'not-empty' : 'empty')); */
DebugKitDebugger::stopTimer('viewRender');
DebugKitDebugger::stopTimer('controllerRender');
if (isset($this->loaded['toolbar'])) {
/* pr(array('function' => 'DebugView::render', */
/* 'checkpoint' => 'toolbarLoaded')); */
$this->loaded['toolbar']->postRender();
}
//Temporary work around to hide the SQL dump at page bottom
Configure::write('debug', 0);
/* pr(array('function' => 'DebugView::render', */
/* 'out-len' => strlen($out), */
/* 'this-output-len' => strlen($this->output), */
/* 'return' => $this->output ? 'not-empty' : 'empty')); */
return $this->output;
}