From cbdd198be57b4f4fe31ce9c68657738370ede2be Mon Sep 17 00:00:00 2001 From: abijah Date: Sat, 13 Jun 2009 03:46:17 +0000 Subject: [PATCH] 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 --- plugins/debug_kit/views/debug.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/plugins/debug_kit/views/debug.php b/plugins/debug_kit/views/debug.php index d296bc6..ed2a2a4 100644 --- a/plugins/debug_kit/views/debug.php +++ b/plugins/debug_kit/views/debug.php @@ -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; }