Changing new Model() for ClassRegistry::init(). Fixes issues when baking admin and non-admin methods for a controller that uses bound translations + TranslateBehavior. Fixes #245

This commit is contained in:
mark_story 2009-11-12 09:32:45 -05:00
parent a7a6dc8c43
commit 38f578199d

View file

@ -252,7 +252,7 @@ class ControllerTask extends Shell {
exit;
}
$actions = null;
$modelObj =& new $currentModelName();
$modelObj =& ClassRegistry::init($currentModelName);
$controllerPath = $this->_controllerPath($controllerName);
$pluralName = $this->_pluralName($currentModelName);
$singularName = Inflector::variable($currentModelName);