Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changing new Model() for ClassRegistry::init(). Fixes issues when bak…

…ing admin and non-admin methods for a controller that uses bound translations + TranslateBehavior. Fixes #245
  • Loading branch information...
commit 38f578199de3ff6b6debbe8c17d73762354fd6d0 1 parent a7a6dc8
@markstory markstory authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  cake/console/libs/tasks/controller.php
View
2  cake/console/libs/tasks/controller.php
@@ -252,7 +252,7 @@ function bakeActions($controllerName, $admin = null, $wannaUseSession = true) {
exit;
}
$actions = null;
- $modelObj =& new $currentModelName();
+ $modelObj =& ClassRegistry::init($currentModelName);
$controllerPath = $this->_controllerPath($controllerName);
$pluralName = $this->_pluralName($currentModelName);
$singularName = Inflector::variable($currentModelName);
Please sign in to comment.
Something went wrong with that request. Please try again.