Removing controller dump and debug = 3 support from View. Controller dumps often cause memory overflow errors, and are generally not useful.

This commit is contained in:
Mark Story 2009-12-19 12:30:31 -05:00
parent a89fcba243
commit 6efe61d9b2
3 changed files with 0 additions and 36 deletions

View file

@ -1,25 +0,0 @@
<?php
/**
*
* PHP versions 4 and 5
*
* CakePHP(tm) : Rapid Development Framework (http://cakephp.org)
* Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
*
* Licensed under The MIT License
* Redistributions of files must retain the above copyright notice.
*
* @copyright Copyright 2005-2009, Cake Software Foundation, Inc. (http://cakefoundation.org)
* @link http://cakephp.org CakePHP(tm) Project
* @package cake
* @subpackage cake.cake.libs.view.templates.elements
* @since CakePHP(tm) v 0.10.5.1782
* @license MIT License (http://www.opensource.org/licenses/mit-license.php)
*/
?>
<div id="cakeControllerDump">
<h2><?php __('Controller dump:'); ?></h2>
<pre>
<?php echo h(print_r($controller, true)); ?>
</pre>
</div>

View file

@ -54,7 +54,6 @@
?>
</div>
</div>
<?php echo $cakeDebug; ?>
<?php echo $this->element('sql_dump'); ?>
</body>
</html>

View file

@ -433,7 +433,6 @@ class View extends Object {
* - `title_for_layout` - contains page title
* - `content_for_layout` - contains rendered view file
* - `scripts_for_layout` - contains scripts added to header
* - `cakeDebug` - if debug is on, cake debug information is added.
*
* @param string $content_for_layout Content to render in a view, wrapped by the surrounding layout.
* @return mixed Rendered output, or false on error
@ -444,18 +443,9 @@ class View extends Object {
return $this->output;
}
$debug = '';
if (isset($this->viewVars['cakeDebug']) && Configure::read() > 2) {
$params = array('controller' => $this->viewVars['cakeDebug']);
$debug = View::element('dump', $params, false);
unset($this->viewVars['cakeDebug']);
}
$dataForLayout = array_merge($this->viewVars, array(
'content_for_layout' => $content_for_layout,
'scripts_for_layout' => implode("\n\t", $this->__scripts),
'cakeDebug' => $debug
));
if (!isset($dataForLayout['title_for_layout'])) {