Changeset 927

Show
Ignore:
Timestamp:
07/22/08 21:20:45 (3 months ago)
Author:
kaste
Message:

Marginal refactoring in AR->_findEvery().

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib/AkActiveRecord.php

    r926 r927  
    957957    function &_findEvery($options) 
    958958    { 
    959         $limit = isset($options['limit']) ? $options['limit'] : null; 
    960         $offset = isset($options['offset']) ? $options['offset'] : null; 
    961  
    962         $sql = $this->constructFinderSql($options); 
    963         if(!empty($options['bind']) && is_array($options['bind']) && strstr($sql,'?')){ 
    964             $sql = array_merge(array($sql),$options['bind']); 
    965         } 
    966  
    967959        if((!empty($options['include']) && $this->hasAssociations())){ 
    968960            $result =& $this->findWithAssociations($options); 
    969961        }else{ 
     962            $sql = $this->constructFinderSql($options); 
     963            if(!empty($options['bind']) && is_array($options['bind']) && strstr($sql,'?')){ 
     964                $sql = array_merge(array($sql),$options['bind']); 
     965            } 
     966             
    970967            $result =& $this->findBySql($sql); 
    971968        }