mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-09-07 12:02:41 +00:00
"Fixes #3887, Controller::modelClass incorrect when using AppController::uses"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6384 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
5b3cbf2ea0
commit
7098c5558c
1 changed files with 5 additions and 0 deletions
|
@ -335,6 +335,11 @@ class Controller extends Object {
|
|||
if ($uses == $this->uses && !empty($this->uses)) {
|
||||
if (!in_array($plugin . $this->modelClass, $this->uses)) {
|
||||
array_unshift($this->uses, $plugin . $this->modelClass);
|
||||
} elseif ($this->uses[0] !== $plugin . $this->modelClass) {
|
||||
$this->uses = array_flip($this->uses);
|
||||
unset($this->uses[$plugin . $this->modelClass]);
|
||||
$this->uses = array_flip($this->uses);
|
||||
array_unshift($this->uses, $plugin . $this->modelClass);
|
||||
}
|
||||
} elseif ($this->uses !== null || $this->uses !== false) {
|
||||
$merge[] = 'uses';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue