mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX Fixed broken query if deleting a single File record - order by is not necessary and breaks MSSQL
This commit is contained in:
parent
37f29d46a3
commit
df81f2a037
@ -57,7 +57,7 @@ class FileSubsites extends DataObjectDecorator {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(sizeof($query->select)>1 || $query->select[0]!='COUNT(*)'){
|
if(sizeof($query->select) > 1 && $query->select[0] != 'COUNT(*)'){
|
||||||
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
$query->orderby = 'SubsiteID' . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user