diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 7128a1c72..3fac20ea8 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1081,7 +1081,7 @@ class DboSource extends DataSource { return false; } - $filtered = $this->__filterResults($resultSet, $model); + $filtered = $this->_filterResults($resultSet, $model); if ($model->recursive > -1) { 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)) { @@ -1125,9 +1125,8 @@ class DboSource extends DataSource { * @param object $model Instance of model to operate against * @param array $filtered List of classes already filtered, to be skipped * @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(); $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); } elseif ($type === 'hasAndBelongsToMany') { $ins = $fetch = array(); diff --git a/cake/libs/model/model.php b/cake/libs/model/model.php index 3ef6c7a2b..e5e0e4819 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -2175,7 +2175,7 @@ class Model extends Object { $this->resetAssociations(); if ($query['callbacks'] === true || $query['callbacks'] === 'after') { - $results = $this->__filterResults($results); + $results = $this->_filterResults($results); } $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) * @return array Set of filtered results */ - private function __filterResults($results, $primary = true) { + protected function _filterResults($results, $primary = true) { $return = $this->Behaviors->trigger( 'afterFind', array(&$this, $results, $primary),