mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Changed to filterResults be protected instead of private.
This commit is contained in:
parent
728d9b2a26
commit
73b3b65a53
2 changed files with 6 additions and 7 deletions
|
@ -1081,7 +1081,7 @@ class DboSource extends DataSource {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
$filtered = $this->__filterResults($resultSet, $model);
|
$filtered = $this->_filterResults($resultSet, $model);
|
||||||
|
|
||||||
if ($model->recursive > -1) {
|
if ($model->recursive > -1) {
|
||||||
foreach ($_associations as $type) {
|
foreach ($_associations as $type) {
|
||||||
|
@ -1109,7 +1109,7 @@ class DboSource extends DataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->__filterResults($resultSet, $model, $filtered);
|
$this->_filterResults($resultSet, $model, $filtered);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($recursive)) {
|
if (!is_null($recursive)) {
|
||||||
|
@ -1125,9 +1125,8 @@ class DboSource extends DataSource {
|
||||||
* @param object $model Instance of model to operate against
|
* @param object $model Instance of model to operate against
|
||||||
* @param array $filtered List of classes already filtered, to be skipped
|
* @param array $filtered List of classes already filtered, to be skipped
|
||||||
* @return array Array of results that have been filtered through $model->afterFind
|
* @return array Array of results that have been filtered through $model->afterFind
|
||||||
* @access private
|
|
||||||
*/
|
*/
|
||||||
function __filterResults(&$results, &$model, $filtered = array()) {
|
protected function _filterResults(&$results, &$model, $filtered = array()) {
|
||||||
$filtering = array();
|
$filtering = array();
|
||||||
$count = count($results);
|
$count = count($results);
|
||||||
|
|
||||||
|
@ -1215,7 +1214,7 @@ class DboSource extends DataSource {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->__filterResults($fetch, $model);
|
$this->_filterResults($fetch, $model);
|
||||||
return $this->__mergeHasMany($resultSet, $fetch, $association, $model, $linkModel, $recursive);
|
return $this->__mergeHasMany($resultSet, $fetch, $association, $model, $linkModel, $recursive);
|
||||||
} elseif ($type === 'hasAndBelongsToMany') {
|
} elseif ($type === 'hasAndBelongsToMany') {
|
||||||
$ins = $fetch = array();
|
$ins = $fetch = array();
|
||||||
|
|
|
@ -2175,7 +2175,7 @@ class Model extends Object {
|
||||||
$this->resetAssociations();
|
$this->resetAssociations();
|
||||||
|
|
||||||
if ($query['callbacks'] === true || $query['callbacks'] === 'after') {
|
if ($query['callbacks'] === true || $query['callbacks'] === 'after') {
|
||||||
$results = $this->__filterResults($results);
|
$results = $this->_filterResults($results);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->findQueryType = null;
|
$this->findQueryType = null;
|
||||||
|
@ -2409,7 +2409,7 @@ class Model extends Object {
|
||||||
* @param boolean $primary If this is the primary model results (results from model where the find operation was performed)
|
* @param boolean $primary If this is the primary model results (results from model where the find operation was performed)
|
||||||
* @return array Set of filtered results
|
* @return array Set of filtered results
|
||||||
*/
|
*/
|
||||||
private function __filterResults($results, $primary = true) {
|
protected function _filterResults($results, $primary = true) {
|
||||||
$return = $this->Behaviors->trigger(
|
$return = $this->Behaviors->trigger(
|
||||||
'afterFind',
|
'afterFind',
|
||||||
array(&$this, $results, $primary),
|
array(&$this, $results, $primary),
|
||||||
|
|
Loading…
Reference in a new issue