mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
->delete() is no longer susceptible to wrong-subsite bugs
This commit is contained in:
parent
f58f87991e
commit
8b40cf3726
@ -47,7 +47,7 @@ class SiteTreeSubsites extends DataObjectDecorator {
|
||||
if(Subsite::$disable_subsite_filter) return;
|
||||
|
||||
// If you're querying by ID, ignore the sub-site - this is a bit ugly...
|
||||
if(strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false) {
|
||||
if(strpos($query->where[0], ".`ID` = ") === false && strpos($query->where[0], ".ID = ") === false && strpos($query->where[0], "ID = ") !== 0) {
|
||||
|
||||
if($context = DataObject::context_obj()) $subsiteID = (int)$context->SubsiteID;
|
||||
else $subsiteID = (int)Subsite::currentSubsiteID();
|
||||
|
Loading…
Reference in New Issue
Block a user