mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 17:05:39 +02:00
Merge pull request #150 from SilbinaryWolf/fix-arraylistsort
fix(GridFieldOrderableRows/ArrayList): Fix ->sort on ArrayList
This commit is contained in:
commit
1d4f24de36
@ -226,7 +226,12 @@ class GridFieldOrderableRows extends RequestHandler implements
|
||||
$sortterm = $this->extraSortFields.', ';
|
||||
}
|
||||
}
|
||||
$sortterm .= '"'.$this->getSortTable($list).'"."'.$this->getSortField().'"';
|
||||
if ($list instanceof ArrayList) {
|
||||
// Fix bug in 3.1.3+ where ArrayList doesn't account for quotes
|
||||
$sortterm .= $this->getSortTable($list).'.'.$this->getSortField();
|
||||
} else {
|
||||
$sortterm .= '"'.$this->getSortTable($list).'"."'.$this->getSortField().'"';
|
||||
}
|
||||
return $list->sort($sortterm);
|
||||
} else {
|
||||
return $list;
|
||||
|
Loading…
Reference in New Issue
Block a user