From 6b2cf2a48e5d52274afd35820a743bd8d5cbb3be Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Sat, 21 Mar 2009 04:30:04 +0000 Subject: [PATCH] BUGFIX: Fixed translatable test execution by making protected methods public git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@73472 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/Translatable.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/model/Translatable.php b/core/model/Translatable.php index f0f428f73..009f77aba 100755 --- a/core/model/Translatable.php +++ b/core/model/Translatable.php @@ -515,7 +515,7 @@ class Translatable extends DataObjectDecorator { * @param int $originalID Either the primary key of the record this new translation is based on, * or the primary key of this record, to create a new translation group */ - protected function addTranslationGroup($originalID) { + public function addTranslationGroup($originalID) { if(!$this->owner->exists()) return false; $baseDataClass = ClassInfo::baseDataClass($this->owner->class); @@ -534,7 +534,7 @@ class Translatable extends DataObjectDecorator { * * @return int Numeric ID of the translationgroup in the _translationgroup table */ - protected function getTranslationGroup() { + public function getTranslationGroup() { if(!$this->owner->exists()) return false; $baseDataClass = ClassInfo::baseDataClass($this->owner->class); @@ -549,7 +549,7 @@ class Translatable extends DataObjectDecorator { * if this happens to be the last record assigned to the group, * this group ceases to exist. */ - protected function removeTranslationGroup() { + public function removeTranslationGroup() { $baseDataClass = ClassInfo::baseDataClass($this->owner->class); DB::query( sprintf('DELETE FROM "%s_translationgroups" WHERE "OriginalID" = %d', $baseDataClass, $this->owner->ID)