Permalink
Browse files

BUGFIX: Fixed SearchContext::getQuery() to avoid use of deprecated li…

…mit() call signature.
  • Loading branch information...
1 parent 3768483 commit a34f7ccba4a3189dcef5454c2ff5236ba290dfb2 @sminnee sminnee committed Mar 9, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 search/SearchContext.php
View
@@ -124,7 +124,9 @@ public function getQuery($searchParams, $sort = false, $limit = false, $existing
$query = DataList::create($this->modelClass);
}
- $query->limit($limit);
+ if(is_array($limit)) $query->limit(isset($limit['limit']) ? $limit['limit'] : null, isset($limit['start']) ? $limit['start'] : null);
+ else $query->limit($limit);
+
$query->sort($sort);
// hack to work with $searchParems when it's an Object

0 comments on commit a34f7cc

Please sign in to comment.