mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-09-30 05:09:15 +02:00
Fixed bug with deleting in CMS
This commit is contained in:
parent
c301044be9
commit
956e2402df
@ -54,6 +54,8 @@ class SiteTreeSubsites extends DataObjectDecorator {
|
|||||||
|
|
||||||
// The foreach is an ugly way of getting the first key :-)
|
// The foreach is an ugly way of getting the first key :-)
|
||||||
foreach($query->from as $tableName => $info) {
|
foreach($query->from as $tableName => $info) {
|
||||||
|
// The tableName should be SiteTree or SiteTree_Live...
|
||||||
|
if(strpos($tableName,'SiteTree') === false) break;
|
||||||
$query->where[] = "`$tableName`.SubsiteID IN ($subsiteID)";
|
$query->where[] = "`$tableName`.SubsiteID IN ($subsiteID)";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user