mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
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:
parent
d1162169ba
commit
5c2097f7d3
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue