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

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@98217 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2010-02-04 05:08:09 +00:00 committed by Sam Minnee
parent 4fbc5572d6
commit 3f8ae83dad
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();