From fedd72fe8313c441f8838a4a8df2458bd64f0d03 Mon Sep 17 00:00:00 2001 From: Kaste Date: Wed, 23 Jul 2008 02:20:45 +0000 Subject: [PATCH] Marginal refactoring in AR->_findEvery(). git-svn-id: http://svn.akelos.org/trunk@927 a2fa5c27-f921-0410-a72c-bf682d381be0 --- lib/AkActiveRecord.php | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/lib/AkActiveRecord.php b/lib/AkActiveRecord.php index 7c0b4ac..32a2f23 100644 --- a/lib/AkActiveRecord.php +++ b/lib/AkActiveRecord.php @@ -956,17 +956,14 @@ class AkActiveRecord extends AkAssociatedActiveRecord function &_findEvery($options) { - $limit = isset($options['limit']) ? $options['limit'] : null; - $offset = isset($options['offset']) ? $options['offset'] : null; - - $sql = $this->constructFinderSql($options); - if(!empty($options['bind']) && is_array($options['bind']) && strstr($sql,'?')){ - $sql = array_merge(array($sql),$options['bind']); - } - if((!empty($options['include']) && $this->hasAssociations())){ $result =& $this->findWithAssociations($options); }else{ + $sql = $this->constructFinderSql($options); + if(!empty($options['bind']) && is_array($options['bind']) && strstr($sql,'?')){ + $sql = array_merge(array($sql),$options['bind']); + } + $result =& $this->findBySql($sql); } -- 2.11.4.GIT