mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
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
This commit is contained in:
parent
d922d2c36a
commit
6b2cf2a48e
@ -515,7 +515,7 @@ class Translatable extends DataObjectDecorator {
|
|||||||
* @param int $originalID Either the primary key of the record this new translation is based on,
|
* @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
|
* 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;
|
if(!$this->owner->exists()) return false;
|
||||||
|
|
||||||
$baseDataClass = ClassInfo::baseDataClass($this->owner->class);
|
$baseDataClass = ClassInfo::baseDataClass($this->owner->class);
|
||||||
@ -534,7 +534,7 @@ class Translatable extends DataObjectDecorator {
|
|||||||
*
|
*
|
||||||
* @return int Numeric ID of the translationgroup in the <classname>_translationgroup table
|
* @return int Numeric ID of the translationgroup in the <classname>_translationgroup table
|
||||||
*/
|
*/
|
||||||
protected function getTranslationGroup() {
|
public function getTranslationGroup() {
|
||||||
if(!$this->owner->exists()) return false;
|
if(!$this->owner->exists()) return false;
|
||||||
|
|
||||||
$baseDataClass = ClassInfo::baseDataClass($this->owner->class);
|
$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,
|
* if this happens to be the last record assigned to the group,
|
||||||
* this group ceases to exist.
|
* this group ceases to exist.
|
||||||
*/
|
*/
|
||||||
protected function removeTranslationGroup() {
|
public function removeTranslationGroup() {
|
||||||
$baseDataClass = ClassInfo::baseDataClass($this->owner->class);
|
$baseDataClass = ClassInfo::baseDataClass($this->owner->class);
|
||||||
DB::query(
|
DB::query(
|
||||||
sprintf('DELETE FROM "%s_translationgroups" WHERE "OriginalID" = %d', $baseDataClass, $this->owner->ID)
|
sprintf('DELETE FROM "%s_translationgroups" WHERE "OriginalID" = %d', $baseDataClass, $this->owner->ID)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user