mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Fixed legacy handling of Translatable::enable(),Translatable::disable() and Translatable::is_enabled() - applying extension to SiteTree instead of Page to avoid datamodel clashes
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@74069 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
c31a7e748a
commit
301180d491
@ -346,29 +346,29 @@ class Translatable extends DataObjectDecorator {
|
||||
/**
|
||||
* Enables the multilingual feature
|
||||
*
|
||||
* @deprecated 2.4 Use Object::add_extension('Page', 'Translatable')
|
||||
* @deprecated 2.4 Use Object::add_extension('SiteTree', 'Translatable')
|
||||
*/
|
||||
static function enable() {
|
||||
Object::add_extension('Page', 'Translatable');
|
||||
Object::add_extension('SiteTree', 'Translatable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the multilingual feature
|
||||
*
|
||||
* @deprecated 2.4 Use Object::remove_extension('Page', 'Translatable')
|
||||
* @deprecated 2.4 Use Object::remove_extension('SiteTree', 'Translatable')
|
||||
*/
|
||||
static function disable() {
|
||||
Object::remove_extension('Page', 'Translatable');
|
||||
Object::remove_extension('SiteTree', 'Translatable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether multilingual support has been enabled
|
||||
*
|
||||
* @deprecated 2.4 Use Object::has_extension('Page', 'Translatable')
|
||||
* @deprecated 2.4 Use Object::has_extension('SiteTree', 'Translatable')
|
||||
* @return boolean True if enabled
|
||||
*/
|
||||
static function is_enabled() {
|
||||
return Object::has_extension('Page', 'Translatable');
|
||||
return Object::has_extension('SiteTree', 'Translatable');
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user