[BUGFIX] CategoryRegistry::addTcaColumn() ignores displayCond 81/46381/2
authorBenni Mack <benni@typo3.org>
Fri, 29 Jan 2016 22:16:16 +0000 (23:16 +0100)
committerBenni Mack <benni@typo3.org>
Fri, 29 Jan 2016 22:17:11 +0000 (23:17 +0100)
Adds check for displayCond and include it if present.

Resolves: #70307
Releases: master, 7.6, 6.2
Change-Id: I94b61bd2f098b279745028731b8392a9bf3389b2
Reviewed-on: https://review.typo3.org/46381
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Classes/Category/CategoryRegistry.php

index 332e549..98ba247 100644 (file)
@@ -364,6 +364,9 @@ class CategoryRegistry implements SingletonInterface {
                        if (isset($options['l10n_display'])) {
                                $columns[$fieldName]['l10n_display'] = $options['l10n_display'];
                        }
+                       if (isset($options['displayCond'])) {
+                               $columns[$fieldName]['displayCond'] = $options['displayCond'];
+                       }
 
                        // Register opposite references for the foreign side of a relation
                        if (empty($GLOBALS['TCA']['sys_category']['columns']['items']['config']['MM_oppositeUsage'][$tableName])) {