Skip to content
Permalink
Browse files

Handle plugin association consistently

  • Loading branch information...
psaintjust committed Jul 9, 2016
1 parent ae42deb commit 7edcdb0799520904c5d1c7ad97e6057e249a99e5
Showing with 7 additions and 7 deletions.
  1. +7 −7 lib/Cake/Model/Model.php
@@ -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);

0 comments on commit 7edcdb0

Please sign in to comment.
You can’t perform that action at this time.