mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
BUGFIX FileSubsites::augmentSQL() sometimes tries to add an ORDER BY clause when running DELETE queries... obviously this makes no sense, and some databases will choke
This commit is contained in:
parent
69033011af
commit
47d35fcca1
@ -59,7 +59,10 @@ class FileSubsites extends DataObjectDecorator {
|
||||
break;
|
||||
}
|
||||
|
||||
$query->orderby = "\"SubsiteID\"" . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||
// Ordering when deleting doesn't make sense
|
||||
if(!$query->delete) {
|
||||
$query->orderby = "\"SubsiteID\"" . ($query->orderby ? ', ' : '') . $query->orderby;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user