Fixed bug #12269: List module renders wrong data in localization view when record...
authorRupert Germann <rupi@gmx.li>
Tue, 20 Oct 2009 20:18:32 +0000 (20:18 +0000)
committerRupert Germann <rupi@gmx.li>
Tue, 20 Oct 2009 20:18:32 +0000 (20:18 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@6196 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/class.db_list_extra.inc

index 517bb52..c146625 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,7 @@
 
 2009-10-20  Rupert Germann  <rupi@gmx.li>
 
+       * Fixed bug #12269: List module renders wrong data in localization view when record-overlay was moved in WS (thanks to Tolleiv Nietsch)
        * Fixed bug #8817: Copying Content Elements does not copy Language Overlays (thanks to Tolleiv Nietsch)
        * Fixed bug #2314: When moving records the translation do not move with it (thanks to Tolleiv Nietsch)
        * Fixed bug #539: lang-children "get lost"(should be deleted) when deleting parent-record in default language (thanks to Tolleiv Nietsch)
index c06f596..065dc22 100644 (file)
@@ -551,8 +551,13 @@ class localRecordList extends recordList {
                                                                // For each available translation, render the record:
                                                        if (is_array($this->translations)) {
                                                                foreach ($this->translations as $lRow) {
+                                                                               // $lRow isn't always what we want - if record was moved we've to work with the placeholder records otherwise the list is messed up a bit
+                                                                       if ($row['_MOVE_PLH_uid'] && $row['_MOVE_PLH_pid']) {
+                                                                               $tmpRow = t3lib_BEfunc::getRecordRaw($table, 't3ver_move_id="'.intval($lRow['uid']) . '" AND pid="' . $row['_MOVE_PLH_pid'] . '" AND t3ver_wsid=' . $row['t3ver_wsid'] . t3lib_beFunc::deleteClause($table), $selFieldList);
+                                                                               $lRow = is_array($tmpRow)?$tmpRow:$lRow;
+                                                                       }
                                                                                // In offline workspace, look for alternative record:
-                                                                       t3lib_BEfunc::workspaceOL($table, $lRow, $GLOBALS['BE_USER']->workspace);
+                                                                       t3lib_BEfunc::workspaceOL($table, $lRow, $GLOBALS['BE_USER']->workspace, true);
                                                                        if (is_array($lRow) && $GLOBALS['BE_USER']->checkLanguageAccess($lRow[$TCA[$table]['ctrl']['languageField']]))  {
                                                                                $currentIdList[] = $lRow['uid'];
                                                                                $iOut.=$this->renderListRow($table,$lRow,$cc,$titleCol,$thumbsCol,18);