Merge pull request #575 from shama/patch-controller

Remove unused code and correct doc for modelClass
This commit is contained in:
Mark Story 2012-03-20 16:14:25 -07:00
commit d1cc29f412

View file

@ -265,7 +265,7 @@ class Controller extends Object implements CakeEventListener {
public $methods = array();
/**
* This controller's primary model class name, the Inflector::classify()'ed version of
* This controller's primary model class name, the Inflector::singularize()'ed version of
* the controller's $name property.
*
* Example: For a controller named 'Comments', the modelClass would be 'Comment'
@ -363,9 +363,6 @@ class Controller extends Object implements CakeEventListener {
foreach ($this->uses as $modelClass) {
list($plugin, $class) = pluginSplit($modelClass, true);
if ($name === $class) {
if (!$plugin) {
$plugin = $this->plugin ? $this->plugin . '.' : null;
}
return $this->loadModel($modelClass);
}
}