BUGFIX: Fixed SearchContext::getQuery() to avoid use of deprecated limit() call signature.

This commit is contained in:
Sam Minnee 2012-03-09 18:12:14 +13:00
parent 37684837b8
commit a34f7ccba4

View File

@ -124,7 +124,9 @@ class SearchContext extends Object {
$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