Permalink
Browse files

Remove unused $resultSet argument from generateAssociationQuery().

  • Loading branch information...
bar committed Nov 9, 2013
1 parent 5da05d9 commit 53c6df554c096dd354fbf1ead808791acd53180e
Showing with 58 additions and 112 deletions.
  1. +5 −7 lib/Cake/Model/Datasource/DboSource.php
  2. +53 −105 lib/Cake/Test/Case/Model/Datasource/Database/MysqlTest.php
@@ -1056,7 +1056,6 @@ public function read(Model $model, $queryData = array(), $recursive = null) {
// Generate hasOne and belongsTo associations inside $queryData
$linkedModels = array();
- $null = null;
foreach ($_associations as $type) {
if ($type !== 'hasOne' && $type !== 'belongsTo') {
continue;
@@ -1073,14 +1072,14 @@ public function read(Model $model, $queryData = array(), $recursive = null) {
if ($bypass) {
$assocData['fields'] = false;
}
- if ($this->generateAssociationQuery($model, $linkModel, $type, $assoc, $assocData, $queryData, $external, $null) === true) {
+ if ($this->generateAssociationQuery($model, $linkModel, $type, $assoc, $assocData, $queryData, $external) === true) {
$linkedModels[$type . '/' . $assoc] = true;
}
}
}
// Build SQL statement with the primary model, plus hasOne and belongsTo associations
- $query = $this->generateAssociationQuery($model, null, null, null, null, $queryData, false, $null);
+ $query = $this->generateAssociationQuery($model, null, null, null, null, $queryData, false);
$resultSet = $this->fetchAll($query, $model->cacheQueries);
unset($query);
@@ -1204,7 +1203,7 @@ public function queryAssociation(Model $model, &$linkModel, $type, $association,
unset($stack['_joined']);
}
- if (!$query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external, $resultSet)) {
+ if (!$query = $this->generateAssociationQuery($model, $linkModel, $type, $association, $assocData, $queryData, $external)) {
return;
}
@@ -1513,11 +1512,10 @@ protected function _mergeAssociation(&$data, &$merge, $association, $type, $self
* @param string $association
* @param array $assocData
* @param array $queryData
- * @param boolean $external
- * @param array $resultSet
+ * @param boolean $external Whether or not the association query is on an external datasource.
* @return mixed
*/
- public function generateAssociationQuery(Model $model, $linkModel, $type, $association, $assocData, &$queryData, $external, &$resultSet) {
+ public function generateAssociationQuery(Model $model, $linkModel, $type, $association, $assocData, &$queryData, $external) {
$queryData = $this->_scrubQueryData($queryData);
$assocData = $this->_scrubQueryData($assocData);
$modelAlias = $model->alias;
Oops, something went wrong.

0 comments on commit 53c6df5

Please sign in to comment.