BUG Fix compat with userforms/translatable

This commit is contained in:
Damian Mooyman 2015-05-29 15:52:14 +12:00
parent 1c76fdbbee
commit 6aefb2e09f

View File

@ -212,6 +212,21 @@ class Translatable extends DataExtension implements PermissionProvider {
*/
private static $enforce_global_unique_urls = true;
/**
* Exclude these fields from translation
*
* @var array
* @config
*/
private static $translate_excluded_fields = array(
'ViewerGroups',
'EditorGroups',
'CanViewType',
'CanEditType',
'NewTransLang',
'createtranslation'
);
/**
* Reset static configuration variables to their default values
*/
@ -1150,15 +1165,8 @@ class Translatable extends DataExtension implements PermissionProvider {
}
}
// TODO Remove hardcoding for SiteTree properties
$excludeFields = array(
'ViewerGroups',
'EditorGroups',
'CanViewType',
'CanEditType',
'NewTransLang',
'createtranslation'
);
// Get excluded fields from translation
$excludeFields = $this->owner->config()->translate_excluded_fields;
// if a language other than default language is used, we're in "translation mode",
// hence have to modify the original fields