From 956e2402dfc8b2d8c25ab1c7863ac30c4c6455ba Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Tue, 6 Nov 2007 03:06:02 +0000 Subject: [PATCH] Fixed bug with deleting in CMS --- code/SiteTreeSubsites.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/SiteTreeSubsites.php b/code/SiteTreeSubsites.php index a79e5e8..de95910 100644 --- a/code/SiteTreeSubsites.php +++ b/code/SiteTreeSubsites.php @@ -54,6 +54,8 @@ class SiteTreeSubsites extends DataObjectDecorator { // The foreach is an ugly way of getting the first key :-) 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)"; break; }