Adding fix for Controller::modelClass; name when var $uses; is not the same as the Controllers singular name.

This is now set to the first value of the key $uses[0] if multiple models are added to var $uses;

git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@4932 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
phpnut 2007-04-30 03:43:48 +00:00
parent d1162169ba
commit 5c2097f7d3

View file

@ -379,6 +379,7 @@ class Controller extends Object {
if ($this->uses) {
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
$this->modelClass = $uses[0];
foreach($uses as $modelClass) {
$id = false;