[BUGFIX] Add workspace overlay for fetched records. 59/10759/8
authorTimo Webler <timo.webler@dkd.de>
Wed, 25 Apr 2012 15:07:31 +0000 (17:07 +0200)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 11 Oct 2013 14:26:20 +0000 (16:26 +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/10759
Reviewed-by: Sascha Egerer
Tested-by: Sascha Egerer
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
typo3/sysext/backend/Classes/Form/DataPreprocessor.php

index a22eae0..f7db268 100644 (file)
@@ -755,6 +755,8 @@ class DataPreprocessor {
                // Foreign_table
                $subres = BackendUtility::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
+                       BackendUtility::workspaceOL($fieldConfig['config']['foreign_table'], $subrow);
                        $recordList[$subrow['uid']] = BackendUtility::getRecordTitle($fieldConfig['config']['foreign_table'], $subrow);
                }
                $GLOBALS['TYPO3_DB']->sql_free_result($subres);
@@ -762,6 +764,8 @@ class DataPreprocessor {
                if (is_array($GLOBALS['TCA'][$fieldConfig['config']['neg_foreign_table']])) {
                        $subres = BackendUtility::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
+                               BackendUtility::workspaceOL($fieldConfig['config']['nes_foreign_table'], $subrow);
                                $recordList[-$subrow['uid']] = BackendUtility::getRecordTitle($fieldConfig['config']['neg_foreign_table'], $subrow);
                        }
                        $GLOBALS['TYPO3_DB']->sql_free_result($subres);