mirror of
https://github.com/silverstripe/silverstripe-mssql
synced 2024-10-22 08:05:53 +02:00
Checking for underscore in SortColumn just to be sure
This commit is contained in:
parent
7c369a383a
commit
91548f76be
@ -1236,7 +1236,7 @@ class MSSQLDatabase extends SS_Database {
|
||||
// just use the function directly in the order by instead of the alias
|
||||
$selects = $query->getSelect();
|
||||
foreach($orderby as $field => $dir) {
|
||||
if(preg_match('/SortColumn/', $field)) {
|
||||
if(preg_match('/_SortColumn/', $field)) {
|
||||
unset($orderby[$field]);
|
||||
$orderby[$selects[str_replace('"', '', $field)]] = $dir;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user