Fixed bug #10958: Broken i18n_parent relation upon localizing records in workspace...
authorSteffen Kamper <info@sk-typo3.de>
Mon, 5 Jul 2010 13:43:40 +0000 (13:43 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Mon, 5 Jul 2010 13:43:40 +0000 (13:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8094 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/alt_doc.php

index f0d6cf5..5a9ab6a 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-07-05  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #10958: Broken i18n_parent relation upon localizing records in workspace (Thanks to Tolleiv Nietsch)
        * Fixed bug #14907: Help Modules can not be disabled on a per user basis (Thanks to Georg Ringer)
        * Fixed bug #14957: Styling of record history (Thanks to Georg Ringer)
 
index 76dfd99..009bafd 100644 (file)
@@ -1089,13 +1089,20 @@ class SC_alt_doc {
                                $fetchFields = 'uid,'.$languageField.','.$transOrigPointerField;
 
                                        // get record in current language
+                               $rowCurrent = t3lib_befunc::getLiveVersionOfRecord($table, $uid, $fetchFields);
+                               if (!is_array($rowCurrent)) {
                                $rowCurrent = t3lib_befunc::getRecord($table, $uid, $fetchFields);
+                               }
+
                                $currentLanguage = $rowCurrent[$languageField];
 
                                if ($currentLanguage>-1)        {       // Disabled for records with [all] language!
                                                // get record in default language if needed
                                        if ($currentLanguage) {
+                                               $rowsByLang[0] = t3lib_befunc::getLiveVersionOfRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
+                                               if (!is_array($rowsByLang[0])) {
                                                $rowsByLang[0] = t3lib_befunc::getRecord($table, $rowCurrent[$transOrigPointerField], $fetchFields);
+                                               }
                                        } else {
                                                $rowsByLang[0] = $rowCurrent;
                                        }