[BUGFIX] Reenable Page TSconfig setting mod.web_list.hideTranslations 72/60372/3
authorJan Helke <typo3@helke.de>
Fri, 5 Apr 2019 07:34:53 +0000 (09:34 +0200)
committerDaniel Goerz <daniel.goerz@posteo.de>
Mon, 8 Apr 2019 09:47:18 +0000 (11:47 +0200)
This regression fix reenables the setting mod.web_list.hideTranslations to
enable administrators to hide translations in the list view.
This behaviour is already described under
https://docs.typo3.org/typo3cms/TSconfigReference/PageTsconfig/Mod.html

Resolves: #88084
Releases: master, 9.5
Change-Id: I8bc0ce072a44c78564889325c888eb26fdb23a1c
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/60372
Tested-by: Sebastian Rosskopf <sebastian.rosskopf@gmx.de>
Tested-by: Jochen <rothjochen@gmail.com>
Tested-by: Raphael Thanner <r.thanner@zeroseven.de>
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Daniel Windloff
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Sebastian Rosskopf <sebastian.rosskopf@gmx.de>
Reviewed-by: Jochen <rothjochen@gmail.com>
Reviewed-by: Raphael Thanner <r.thanner@zeroseven.de>
Reviewed-by: Daniel Windloff
Reviewed-by: Steffen Frese <steffenf14@gmail.com>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php

index 30e43ce..06d68db 100644 (file)
@@ -1193,7 +1193,7 @@ class DatabaseRecordList
                         // If no search happened it means that the selected
                         // records are either default or All language and here we will not select translations
                         // which point to the main record:
-                        if ($l10nEnabled && $this->searchString === '') {
+                        if ($l10nEnabled && $this->searchString === '' && !($this->hideTranslations === '*' || GeneralUtility::inList($this->hideTranslations, $table))) {
                             // For each available translation, render the record:
                             if (is_array($this->translations)) {
                                 foreach ($this->translations as $lRow) {