mirror of
https://github.com/symbiote/silverstripe-gridfieldextensions.git
synced 2024-10-22 15:05:39 +00:00
fix(GridFieldOrderableRows/ArrayList): Fix ->sort on ArrayList to not use quotes (to work around a bug in framework 3.1+)
This commit is contained in:
parent
b04595c975
commit
cccc5241cd
@ -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…
x
Reference in New Issue
Block a user