From 20ae380350b347a6d446ee8ca2adda1d5735afd8 Mon Sep 17 00:00:00 2001 From: Mateusz Uzdowski Date: Fri, 2 Nov 2012 15:28:49 +1300 Subject: [PATCH] BUG Flip the conditional to restore the original intention. The original intention was to skip if ImageTracking was found, but it got broken on c9d3a1f8. --- code/extensions/FileSubsites.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/extensions/FileSubsites.php b/code/extensions/FileSubsites.php index 3c4513b..147c072 100644 --- a/code/extensions/FileSubsites.php +++ b/code/extensions/FileSubsites.php @@ -46,7 +46,7 @@ class FileSubsites extends DataExtension { function augmentSQL(SQLQuery &$query) { // If you're querying by ID, ignore the sub-site - this is a bit ugly... (but it was WAYYYYYYYYY worse) //@TODO I don't think excluding if SiteTree_ImageTracking is a good idea however because of the SS 3.0 api and ManyManyList::removeAll() changing the from table after this function is called there isn't much of a choice - if(!array_search('SiteTree_ImageTracking', $query->getFrom())===false && (!$query->where || !preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0]))) { + if(array_search('SiteTree_ImageTracking', $query->getFrom())===false && (!$query->where || !preg_match('/\.(\'|"|`|)ID(\'|"|`|)/', $query->where[0]))) { /*if($context = DataObject::context_obj()) $subsiteID = (int) $context->SubsiteID; else */$subsiteID = (int) Subsite::currentSubsiteID();