[BUGFIX] Add workspace overlay for fetched records. 81/24581/2
authorAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Oct 2013 14:40:54 +0000 (16:40 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Oct 2013 15:02:41 +0000 (17:02 +0200)
Call workspace overlay to resolve the right uid for
move-placeholder.

Change-Id: I6af65fcda1b1fffe72dfbc314976e42f30120d71
Fixes: #36573
Releases: 6.2, 6.1, 6.0, 4.7, 4.5
Reviewed-on: https://review.typo3.org/24581
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
t3lib/class.t3lib_transferdata.php

index 3216f71..8070cc0 100644 (file)
@@ -834,6 +834,8 @@ class t3lib_transferData {
                        // foreign_table
                $subres = t3lib_BEfunc::exec_foreign_table_where_query($fieldConfig, $field, $TSconfig);
                while ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($subres)) {
+                       // Resolve move-placeholder, to check the right uid against $dataIds
+                       t3lib_BEfunc::workspaceOL($fieldConfig['config']['foreign_table'], $subrow);
                        $recordList[$subrow['uid']] = t3lib_BEfunc::getRecordTitle($fieldConfig['config']['foreign_table'], $subrow);
                }
 
@@ -841,6 +843,8 @@ class t3lib_transferData {
                if (is_array($TCA[$fieldConfig['config']['neg_foreign_table']])) {
                        $subres = t3lib_BEfunc::exec_foreign_table_where_query($fieldConfig, $field, $TSconfig, 'neg_');
                        while ($subrow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($subres)) {
+                               // Resolve move-placeholder, to check the right uid against $dataIds
+                               t3lib_BEfunc::workspaceOL($fieldConfig['config']['nes_foreign_table'], $subrow);
                                $recordList[-$subrow['uid']] = t3lib_BEfunc::getRecordTitle($fieldConfig['config']['neg_foreign_table'], $subrow);
                        }
                }
@@ -1014,4 +1018,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA
        include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_transferdata.php']);
 }
 
-?>
\ No newline at end of file
+?>