Removing paging subset occuring before pagination is set

This commit is contained in:
Matt Gunn 2013-05-17 11:45:15 +12:00
parent 9ae0cecc36
commit 13cdb07539
1 changed files with 1 additions and 5 deletions

View File

@ -1418,11 +1418,7 @@ class MSSQLDatabase extends SS_Database {
$objects = array();
foreach ($result as $row) {
$current++;
// Select a subset for paging
if ($current >= $start && $current < $start + $pageLength) {
$objects[] = DataObject::get_by_id($row['Source'], $row['ID']);
}
$objects[] = DataObject::get_by_id($row['Source'], $row['ID']);
}
if(isset($objects)) $results = new ArrayList($objects);