[BUGFIX] Adds missing tablename sys_language in fetchOriginLanguage function 45/48045/4
authorMarvin Dettinger <mde@rtp.ch>
Mon, 9 May 2016 15:38:10 +0000 (17:38 +0200)
committerNicole Cordes <typo3@cordes.co>
Tue, 24 May 2016 12:05:06 +0000 (14:05 +0200)
Resolves: #76098
Releases: master, 7.6
Change-Id: I4ceb644328671cd3355340d6b6991d60e88b265a
Reviewed-on: https://review.typo3.org/48045
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Tested-by: Nicole Cordes <typo3@cordes.co>
typo3/sysext/backend/Classes/Domain/Repository/Localization/LocalizationRepository.php

index edaddb3..d1c7e03 100644 (file)
@@ -33,11 +33,12 @@ class LocalizationRepository
     {
         $record = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
             'tt_content_orig.sys_language_uid',
-            'tt_content,tt_content AS tt_content_orig',
+            'tt_content,tt_content AS tt_content_orig,sys_language',
             'tt_content.colPos = ' . (int)$colPos
             . ' AND tt_content.pid = ' . (int)$pageId
             . ' AND tt_content.sys_language_uid = ' . (int)$localizedLanguage
             . ' AND tt_content.t3_origuid = tt_content_orig.uid'
+            . ' AND tt_content_orig.sys_language_uid=sys_language.uid'
             . $this->getExcludeQueryPart()
             . $this->getAllowedLanguagesForBackendUser(),
             'tt_content_orig.sys_language_uid'