Fixed bug #13749: IRRE: Inline elements of translated records are not coppied correct...
authorBenni Mack <benni.mack@typo3.org>
Fri, 21 May 2010 21:41:08 +0000 (21:41 +0000)
committerBenni Mack <benni.mack@typo3.org>
Fri, 21 May 2010 21:41:08 +0000 (21:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7646 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index fb6dc98..d17aefb 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-21  Benjamin Mack  <benni@typo3.org>
+
+       * Fixed bug #13749: IRRE: Inline elements of translated records are not coppied correctly. (Thanks to Albrecht Koehnlein)
+
 2010-05-20  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #7753: EM warns No XCLASS inclusion code found if you use $GLOBALS['TYPO3_CONF_VARS'] (thanks to Franz Holzinger)
index e054967..a9b5b9e 100644 (file)
@@ -3176,8 +3176,8 @@ class t3lib_TCEmain       {
 
                                        // Walk through the items, copy them and remember the new id:
                                foreach ($dbAnalysis->itemArray as $k => $v) {
-                                               // If language is set, this isn't a copy action but a localization of our parent/ancestor:
-                                       if ($language>0) {
+                                               // If language is set and differs from original record, this isn't a copy action but a localization of our parent/ancestor:
+                                       if ($language>0 && isset($TCA[$table]['ctrl']['languageField']) && $language != $row[$TCA[$table]['ctrl']['languageField']]) {
                                                        // If children should be localized when the parent gets localized the first time, just do it:
                                                if ($localizationMode!=false && isset($conf['behaviour']['localizeChildrenAtParentLocalization']) && $conf['behaviour']['localizeChildrenAtParentLocalization']) {
                                                        $newId = $this->localize($v['table'], $v['id'], $language);