Skip to content
Permalink
Browse files

Moving Component::beforeRender triggering to allow components to modify

the view class to use for the render() call.  Fixes #917

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
ceeram authored and markstory committed Jul 15, 2010
1 parent 0e184c6 commit 32ea6d24cf7e88ab7261ee6bbd85f0b415c9a788
Showing with 1 addition and 2 deletions.
  1. +1 −2 cake/libs/controller/controller.php
@@ -865,6 +865,7 @@ function validateErrors() {
*/
function render($action = null, $layout = null, $file = null) {
$this->beforeRender();
$this->Component->triggerCallback('beforeRender', $this);
$viewClass = $this->view;
if ($this->view != 'View') {
@@ -873,8 +874,6 @@ function render($action = null, $layout = null, $file = null) {
App::import('View', $this->view);
}
$this->Component->triggerCallback('beforeRender', $this);
$this->params['models'] = $this->modelNames;
if (Configure::read() > 2) {

0 comments on commit 32ea6d2

Please sign in to comment.
You can’t perform that action at this time.