mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
"Fixes #3748, Auto loading model classes fail in plugins when using $uses in the AppController"
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6211 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
27721cb730
commit
877cf930ad
1 changed files with 4 additions and 1 deletions
|
@ -334,7 +334,11 @@ class Controller extends Object {
|
|||
*/
|
||||
function constructClasses() {
|
||||
if(isset($this->plugin)) {
|
||||
if(isset($this->uses[0]) && $this->uses[0] === $this->modelClass) {
|
||||
$this->uses[0] = Inflector::camelize($this->plugin) . '.' . $this->modelClass;
|
||||
}
|
||||
$appController = Inflector::camelize($this->plugin) . 'AppController';
|
||||
|
||||
if (is_subclass_of($this, $appController)) {
|
||||
$appVars = get_class_vars($appController);
|
||||
$uses = $appVars['uses'];
|
||||
|
@ -350,7 +354,6 @@ class Controller extends Object {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($this->uses === null || ($this->uses === array())) {
|
||||
|
|
Loading…
Add table
Reference in a new issue