mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Removing duplicated code.
This commit is contained in:
parent
c255539980
commit
1707c92aa1
1 changed files with 1 additions and 4 deletions
|
@ -497,10 +497,7 @@ class Controller extends Object {
|
|||
$this->loadModel($this->modelClass, $id);
|
||||
} elseif ($this->uses) {
|
||||
$uses = is_array($this->uses) ? $this->uses : array($this->uses);
|
||||
$modelClassName = $uses[0];
|
||||
if (strpos($uses[0], '.') !== false) {
|
||||
list($plugin, $modelClassName) = explode('.', $uses[0]);
|
||||
}
|
||||
list($plugin, $modelClassName) = pluginSplit($uses[0]);
|
||||
$this->modelClass = $modelClassName;
|
||||
foreach ($uses as $modelClass) {
|
||||
$this->loadModel($modelClass);
|
||||
|
|
Loading…
Reference in a new issue