[FOLLOWUP][BUGFIX] Set language uid for inline children by default 48/52148/2
authorNicole Cordes <typo3@cordes.co>
Sat, 25 Mar 2017 15:04:09 +0000 (16:04 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 25 Mar 2017 15:26:47 +0000 (16:26 +0100)
Resolves: #48883
Resolves: #76048
Resolves: #73609
Releases: master, 7.6
Change-Id: Id782bd41bfe30d9f9574e4b444d6e361ac76d0c6
Reviewed-on: https://review.typo3.org/52148
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/backend/Classes/Form/Container/InlineControlContainer.php

index 0afe9c7..56c2bec 100644 (file)
@@ -110,10 +110,8 @@ class InlineControlContainer extends AbstractContainer
 
         $language = 0;
         $languageFieldName = $GLOBALS['TCA'][$table]['ctrl']['languageField'];
-        if (BackendUtility::isTableLocalizable($table) && isset($row[$languageFieldName][0])) {
-            $language = (int)$row[$languageFieldName][0];
-        } elseif (BackendUtility::isTableLocalizable($table)) {
-            $language = (int)$row[$languageFieldName];
+        if (BackendUtility::isTableLocalizable($table)) {
+            $language = isset($row[$languageFieldName][0]) ? (int)$row[$languageFieldName][0] : (int)$row[$languageFieldName];
         }
 
         // Add the current inline job to the structure stack