mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Fixing issue loading plugin models when uses == false.
This commit is contained in:
parent
9dd78c7dc1
commit
d202ea643d
1 changed files with 2 additions and 1 deletions
|
@ -476,9 +476,10 @@ class Controller extends Object {
|
||||||
} else {
|
} else {
|
||||||
$id = $this->passedArgs['0'];
|
$id = $this->passedArgs['0'];
|
||||||
}
|
}
|
||||||
|
$plugin = $this->plugin ? $this->plugin . '.' : null;
|
||||||
|
|
||||||
if ($this->uses === false) {
|
if ($this->uses === false) {
|
||||||
$this->loadModel($this->modelClass, $id);
|
$this->loadModel($plugin . $this->modelClass, $id);
|
||||||
} elseif ($this->uses) {
|
} elseif ($this->uses) {
|
||||||
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
||||||
list($plugin, $modelClassName) = pluginSplit($uses[0]);
|
list($plugin, $modelClassName) = pluginSplit($uses[0]);
|
||||||
|
|
Loading…
Add table
Reference in a new issue