mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR: Make sure that Translatable creates a translated parent of SiteTree only when the parent is not translated (from r113955)
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@113956 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d01db84336
commit
8381858d58
@ -771,7 +771,7 @@ class Translatable extends DataObjectDecorator implements PermissionProvider {
|
||||
// Caution: This logic is very sensitve to infinite loops when translation status isn't determined properly
|
||||
// If a parent for the newly written translation was existing before this
|
||||
// onBeforeWrite() call, it will already have been linked correctly through createTranslation()
|
||||
if($this->owner->hasField('ParentID')) {
|
||||
if($this->owner->hasField('ParentID') && $this->owner instanceof SiteTree) {
|
||||
if(
|
||||
!$this->owner->ID
|
||||
&& $this->owner->ParentID
|
||||
|
Loading…
Reference in New Issue
Block a user