Removing deprecated DataList::limit() arguments

Use 2 arguments, the first being limit and the second offset instead.
This commit is contained in:
Sean Harvey 2012-11-15 11:45:48 +13:00
parent 68bb74820a
commit 3108dea2c2

View File

@ -243,10 +243,6 @@ class DataList extends ViewableData implements SS_List, SS_Filterable, SS_Sortab
if(!$limit && !$offset) {
return $this;
}
if($limit && !is_numeric($limit)) {
Deprecation::notice('3.0', 'Please pass limits as 2 arguments, rather than an array or SQL fragment.',
Deprecation::SCOPE_GLOBAL);
}
return $this->alterDataQuery_30(function($query) use ($limit, $offset){
$query->limit($limit, $offset);
});