From 73b3b65a53587035b87561d53b5b931ab98dd6b8 Mon Sep 17 00:00:00 2001 From: Juan Basso Date: Fri, 25 Feb 2011 13:26:14 -0300 Subject: [PATCH] Changed to filterResults be protected instead of private. --- cake/libs/model/datasources/dbo_source.php | 9 ++++----- cake/libs/model/model.php | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/cake/libs/model/datasources/dbo_source.php b/cake/libs/model/datasources/dbo_source.php index 7128a1c72e6..3fac20ea83a 100755 --- a/cake/libs/model/datasources/dbo_source.php +++ b/cake/libs/model/datasources/dbo_source.php @@ -1081,7 +1081,7 @@ public function read($model, $queryData = array(), $recursive = null) { return false; } - $filtered = $this->__filterResults($resultSet, $model); + $filtered = $this->_filterResults($resultSet, $model); if ($model->recursive > -1) { foreach ($_associations as $type) { @@ -1109,7 +1109,7 @@ public function read($model, $queryData = array(), $recursive = null) { } } } - $this->__filterResults($resultSet, $model, $filtered); + $this->_filterResults($resultSet, $model, $filtered); } if (!is_null($recursive)) { @@ -1125,9 +1125,8 @@ public function read($model, $queryData = array(), $recursive = null) { * @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 @@ public function queryAssociation($model, &$linkModel, $type, $association, $asso } } } - $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 3ef6c7a2b11..e5e0e4819c9 100644 --- a/cake/libs/model/model.php +++ b/cake/libs/model/model.php @@ -2175,7 +2175,7 @@ public function find($type = 'first', $query = array()) { $this->resetAssociations(); if ($query['callbacks'] === true || $query['callbacks'] === 'after') { - $results = $this->__filterResults($results); + $results = $this->_filterResults($results); } $this->findQueryType = null; @@ -2409,7 +2409,7 @@ protected function _findThreaded($state, $query, $results = array()) { * @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),