mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Handle plugin association consistently
This commit is contained in:
parent
ae42debeff
commit
7edcdb0799
1 changed files with 7 additions and 7 deletions
|
@ -1035,13 +1035,13 @@ class Model extends Object implements CakeEventListener {
|
|||
unset($association[$assoc]);
|
||||
$assoc = $value;
|
||||
$value = array();
|
||||
|
||||
if (strpos($assoc, '.') !== false) {
|
||||
list($plugin, $assoc) = pluginSplit($assoc, true);
|
||||
$association[$assoc] = array('className' => $plugin . $assoc);
|
||||
} else {
|
||||
$association[$assoc] = $value;
|
||||
}
|
||||
$association[$assoc] = $value;
|
||||
}
|
||||
|
||||
if (!isset($value['className']) && strpos($assoc, '.') !== false) {
|
||||
unset($association[$assoc]);
|
||||
list($plugin, $assoc) = pluginSplit($assoc, true);
|
||||
$association[$assoc] = array('className' => $plugin . $assoc) + $value;
|
||||
}
|
||||
|
||||
$this->_generateAssociation($type, $assoc);
|
||||
|
|
Loading…
Reference in a new issue