[BUGFIX] Use sys_language isocode for SiteLanguage 74/58874/3
authorAlexander Opitz <opitz.alexander@googlemail.com>
Thu, 8 Nov 2018 14:44:36 +0000 (15:44 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Thu, 8 Nov 2018 17:52:22 +0000 (18:52 +0100)
The PseudoSiteFinder transfers the iso code from sys_language
in the correct field for SiteLanguage. Also respect the hidden
field from database as enabled field in SiteLanguage.

Resolves: #86888
Releases: master
Change-Id: I5cf233b3c5d9fc8501e45bd3040263e7a69bb26b
Reviewed-on: https://review.typo3.org/58874
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/core/Classes/Site/PseudoSiteFinder.php

index b581149..534bfc9 100644 (file)
@@ -139,8 +139,9 @@ class PseudoSiteFinder
             $languageRecords[$uid] = [
                 'languageId' => $uid,
                 'title' => $row['title'],
-                'iso' => $row['language_isocode'] ?? '',
+                'iso-639-1' => $row['language_isocode'] ?? '',
                 'flag' => 'flags-' . $row['flag'],
+                'enabled' => !$row['hidden'],
             ];
         }