Changeset 3118

Show
Ignore:
Timestamp:
07/15/2008 11:04:10 PM (5 months ago)
Author:
Shadowhand
Message:

Fix for Database::limit(), only set the offset when it is specifically added.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/system/libraries/Database.php

    r3056 r3118  
    704704         * @return  Database_Core   This Database object. 
    705705         */ 
    706         public function limit($limit, $offset = FALSE) 
     706        public function limit($limit, $offset = NULL) 
    707707        { 
    708708                $this->limit  = (int) $limit; 
    709                 $this->offset(($offset === FALSE)? 0 : $offset); 
     709 
     710                if ($offset !== NULL) 
     711                { 
     712                        $this->offset($offset); 
     713                } 
    710714 
    711715                return $this;