Skip to content

Commit

Permalink
Removing controller dump and debug = 3 support from View. Controller …
Browse files Browse the repository at this point in the history
…dumps often cause memory overflow errors, and are generally not useful.
  • Loading branch information
markstory committed Dec 19, 2009
1 parent a89fcba commit 6efe61d
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 36 deletions.
25 changes: 0 additions & 25 deletions cake/libs/view/elements/dump.ctp

This file was deleted.

1 change: 0 additions & 1 deletion cake/libs/view/layouts/default.ctp
Expand Up @@ -54,7 +54,6 @@
?>
</div>
</div>
<?php echo $cakeDebug; ?>
<?php echo $this->element('sql_dump'); ?>
</body>
</html>
10 changes: 0 additions & 10 deletions cake/libs/view/view.php
Expand Up @@ -433,7 +433,6 @@ function render($action = null, $layout = null, $file = null) {
* - `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
Expand All @@ -444,18 +443,9 @@ function renderLayout($content_for_layout, $layout = null) {
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'])) {
Expand Down

0 comments on commit 6efe61d

Please sign in to comment.