BUGFIX: Fixed access to changed format for SQLQuery::

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@66425 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2008-11-23 23:26:38 +00:00
parent 8eed347ca2
commit 08e9e04f1a

View File

@ -180,7 +180,10 @@ class DataObjectSet extends ViewableData implements IteratorAggregate {
*/
public function parseQueryLimit(SQLQuery $query) {
if($query->limit) {
if(stripos($query->limit, 'OFFSET')) {
if(is_array($query->limit)) {
$length = $query->limit['limit'];
$start = $query->limit['start'];
} else if(stripos($query->limit, 'OFFSET')) {
list($length, $start) = split(" +OFFSET +", trim($query->limit));
} else {
$result = split(" *, *", trim($query->limit));