Skip to content

Commit

Permalink
Handle plugin association consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
psaintjust committed Jul 9, 2016
1 parent ae42deb commit 7edcdb0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/Cake/Model/Model.php
Expand Up @@ -1035,13 +1035,13 @@ protected function _createLinks() {
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);
Expand Down

0 comments on commit 7edcdb0

Please sign in to comment.