mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Merge pull request #11 from mattgunn/patch-1
Removing paging subset occuring before pagination is set
This commit is contained in:
commit
7119d5ac80
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user