Remove typehint from generateAssociationQuery()

While I think typehints are generally a good idea, this one broke a few
plugins, notably CakeDC/search. I don't think it is wise for 2.X release
to break BC in that way. I think reverting this change is probably the
safest path right now.
This commit is contained in:
mark_story 2014-03-12 23:42:21 -04:00
parent 5a944734b8
commit 3a226b03c3

View file

@ -1644,6 +1644,10 @@ class DboSource extends DataSource {
public function generateAssociationQuery(Model $Model, $LinkModel, $type, $association, $assocData, &$queryData, $external) {
$assocData = $this->_scrubQueryData($assocData);
if ($LinkModel === null) {
return '';
}
if ($external && !empty($assocData['finderQuery'])) {
return $assocData['finderQuery'];
}