From 8b40cf37268213edf3b6b57129eaf9ea2005037a Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 6 Dec 2007 03:49:51 +0000 Subject: [PATCH] ->delete() is no longer susceptible to wrong-subsite bugs --- code/SiteTreeSubsites.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/SiteTreeSubsites.php b/code/SiteTreeSubsites.php index de95910..e530702 100644 --- a/code/SiteTreeSubsites.php +++ b/code/SiteTreeSubsites.php @@ -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();