From 06909765d6cd72cd017d9f71904ac8d4f14923e2 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 16 Sep 2007 16:20:07 +0000 Subject: [PATCH] bfojcapell: These changes are required to Translatable versioning support correctly work. Versioned automatically adds this suffix so there is no need to add it here (merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42122 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Hierarchy.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/model/Hierarchy.php b/core/model/Hierarchy.php index fbb84814c..d2fdd83f5 100644 --- a/core/model/Hierarchy.php +++ b/core/model/Hierarchy.php @@ -413,7 +413,7 @@ class Hierarchy extends DataObjectDecorator { } if(isset($idxStageChildren)) { - $foundInLive = Versioned::get_by_stage( $baseClass, 'Live', "`{$baseClass}_Live`.`ID` IN (" . implode(",", array_keys($idxStageChildren)) . ")", "" ); + $foundInLive = Versioned::get_by_stage( $baseClass, 'Live', "`{$baseClass}`.`ID` IN (" . implode(",", array_keys($idxStageChildren)) . ")", "" ); } if(isset($idxLiveChildren)) { @@ -503,7 +503,7 @@ class Hierarchy extends DataObjectDecorator { public function liveChildren($showAll = false) { $extraFilter = $showAll ? '' : " AND ShowInMenus = 1"; $baseClass = ClassInfo::baseDataClass($this->owner->class); - return Versioned::get_by_stage($baseClass, "Live", "`{$baseClass}_Live`.`ParentID` = " . (int)$this->owner->ID . " AND `{$baseClass}_Live`.ID != " . (int)$this->owner->ID. $extraFilter, ""); + return Versioned::get_by_stage($baseClass, "Live", "`{$baseClass}`.`ParentID` = " . (int)$this->owner->ID . " AND `{$baseClass}`.ID != " . (int)$this->owner->ID. $extraFilter, ""); } /**