[+BUGFIX] Extbase (Persistence): Language Oberlay now works with page table as well...
authorJochen Rau <j.rau@web.de>
Tue, 18 Jan 2011 13:49:36 +0000 (13:49 +0000)
committerJochen Rau <j.rau@web.de>
Tue, 18 Jan 2011 13:49:36 +0000 (13:49 +0000)
Resolves #11319.

typo3/sysext/extbase/Classes/Persistence/Storage/Typo3DbBackend.php

index 75e2977..b695d54 100644 (file)
@@ -960,7 +960,9 @@ class Tx_Extbase_Persistence_Storage_Typo3DbBackend implements Tx_Extbase_Persis
                                $tableName = $source->getRight()->getSelectorName();
                        }
                        $this->pageSelectObject->versionOL($tableName, $row, TRUE);
-                       if(isset($GLOBALS['TCA'][$tableName]['ctrl']['languageField']) && $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] !== '') {
+                       if($tableName == 'pages') {
+                               $row = $this->pageSelectObject->getPageOverlay($row, $languageUid);
+                       } elseif(isset($GLOBALS['TCA'][$tableName]['ctrl']['languageField']) && $GLOBALS['TCA'][$tableName]['ctrl']['languageField'] !== '') {
                                if (in_array($row[$GLOBALS['TCA'][$tableName]['ctrl']['languageField']], array(-1,0))) {
                                        $overlayMode = ($languageMode === 'strict') ? 'hideNonTranslated' : '';
                                        $row = $this->pageSelectObject->getRecordOverlay($tableName, $row, $languageUid, $overlayMode);