mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Added disable()
(merged from branches/gsoc) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@42152 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
48eaf7f0bc
commit
266ff8a796
@ -243,6 +243,14 @@ class Translatable extends DataObjectDecorator {
|
||||
static function enable() {
|
||||
Translatable::$enabled = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Disable the multilingual feature
|
||||
*
|
||||
*/
|
||||
static function disable() {
|
||||
Translatable::$enabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether multilingual support has been enabled
|
||||
@ -391,6 +399,7 @@ class Translatable extends DataObjectDecorator {
|
||||
// Every _lang table wants Versioned support
|
||||
return ($this->owner->databaseFields() && $this->hasOwnTranslatableFields());
|
||||
}
|
||||
|
||||
function augmentDatabase() {
|
||||
if (! $this->stat('enabled')) return false;
|
||||
Translatable::set_reading_lang(Translatable::default_lang());
|
||||
|
Loading…
x
Reference in New Issue
Block a user