Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

create View instance after adding model params for request

  • Loading branch information...
commit 677f0708dc3d60dced04bd91e35abfe6527d07e4 1 parent 4edb378
@ceeram ceeram authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/Cake/Controller/Controller.php
View
18 lib/Cake/Controller/Controller.php
@@ -903,15 +903,6 @@ public function render($view = null, $layout = null) {
return $this->response;
}
- $viewClass = $this->viewClass;
- if ($this->viewClass != 'View') {
- list($plugin, $viewClass) = pluginSplit($viewClass, true);
- $viewClass = $viewClass . 'View';
- App::uses($viewClass, $plugin . 'View');
- }
-
- $View = new $viewClass($this);
-
if (!empty($this->uses)) {
foreach ($this->uses as $model) {
list($plugin, $className) = pluginSplit($model);
@@ -922,6 +913,15 @@ public function render($view = null, $layout = null) {
$this->request->params['models'][$this->modelClass] = array('plugin' => $this->plugin, 'className' => $this->modelClass);
}
+ $viewClass = $this->viewClass;
+ if ($this->viewClass != 'View') {
+ list($plugin, $viewClass) = pluginSplit($viewClass, true);
+ $viewClass = $viewClass . 'View';
+ App::uses($viewClass, $plugin . 'View');
+ }
+
+ $View = new $viewClass($this);
+
$models = ClassRegistry::keys();
foreach ($models as $currentModel) {
$currentObject = ClassRegistry::getObject($currentModel);
Please sign in to comment.
Something went wrong with that request. Please try again.