BUGFIX Don't allow translations of VirtualPage (until we can reliably copy data between locales) (see #5000) (from r98217)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@102626 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-04-13 02:28:34 +00:00
parent a3b49b1566
commit 9fdc7cb2ff
2 changed files with 7 additions and 1 deletions

View File

@ -890,6 +890,12 @@ class Translatable extends DataObjectDecorator implements PermissionProvider {
// Don't apply these modifications for normal DataObjects - they rely on CMSMain logic
if(!($this->owner instanceof SiteTree)) return;
// Don't allow translation of virtual pages because of data inconsistencies (see #5000)
$excludedPageTypes = array('VirtualPage');
foreach($excludedPageTypes as $excludedPageType) {
if(is_a($this->owner, $excludedPageType)) return;
}
$excludeFields = array(
'ViewerGroups',
'EditorGroups',

View File

@ -31,7 +31,7 @@ class VirtualPage extends Page {
"Status",
'ShowInMenus',
'ShowInSearch',
'Locale'
// 'Locale'
);
$allFields = $this->db();