[TASK] Version fields in list view only if version is loaded 34/24234/3
authorGeorg Ringer <georg.ringer@gmail.com>
Tue, 1 Oct 2013 20:56:34 +0000 (22:56 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Sat, 5 Oct 2013 11:13:06 +0000 (13:13 +0200)
the extended list view got the entries
t3ver_id
t3ver_state
t3ver_wsid
even though the ext:version is not installed.
This doesn't make sense. Therefore check if the ext is installed

Resolves: #52444
Releases: 6.2
Change-Id: I29e1434d5397b0462b5ecc4f6b46a19cca672aed
Reviewed-on: https://review.typo3.org/24234
Reviewed-by: Xavier Perseguers
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php

index 14a2bd3..279faac 100644 (file)
@@ -911,7 +911,7 @@ class AbstractDatabaseRecordList extends \TYPO3\CMS\Backend\RecordList\AbstractR
                                        if ($GLOBALS['TCA'][$table]['ctrl']['sortby']) {
                                                $fieldListArr[] = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
                                        }
-                                       if ($GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
+                                       if (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('version') && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                                $fieldListArr[] = 't3ver_id';
                                                $fieldListArr[] = 't3ver_state';
                                                $fieldListArr[] = 't3ver_wsid';