FIX Filter by ID to be more compatible with ArrayList

`ArrayList` doesn't have a `byIDs` method so sorting items in an `ArrayList` breaks. This is a more forgiving way of filtering by ID.
This commit is contained in:
Daniel Hensby 2015-01-26 16:42:24 +00:00
parent bb0a84d16a
commit 0f27aef412

View File

@ -224,7 +224,7 @@ class GridFieldOrderableRows extends RequestHandler implements
}
}
$sortterm .= $field;
$items = $list->byIDs($ids)->sort($sortterm);
$items = $list->filter('ID', $ids)->sort($sortterm);
// Ensure that each provided ID corresponded to an actual object.
if(count($items) != count($ids)) {