Code Duplication    Length = 3-4 lines in 8 locations

typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php 1 location

@@ 229-231 (lines=3) @@
226
                $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($table);
227
                $queryBuilder->getRestrictions()->removeAll();
228
                $selectFields = ['uid', 'pid'];
229
                if (!empty($GLOBALS['TCA'][$table]['ctrl']['label'])) {
230
                    $selectFields[] = $GLOBALS['TCA'][$table]['ctrl']['label'];
231
                }
232
                $queryResult = $queryBuilder->select(...$selectFields)
233
                    ->from($table)
234
                    ->where(

typo3/sysext/core/Classes/Database/RelationHandler.php 3 locations

@@ 1217-1220 (lines=4) @@
1214
                        $fields = '*';
1215
                    } else {
1216
                        $fields = 'uid,pid';
1217
                        if ($GLOBALS['TCA'][$table]['ctrl']['label']) {
1218
                            // Titel
1219
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label'];
1220
                        }
1221
                        if ($GLOBALS['TCA'][$table]['ctrl']['label_alt']) {
1222
                            // Alternative Title-Fields
1223
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label_alt'];
@@ 1221-1224 (lines=4) @@
1218
                            // Titel
1219
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label'];
1220
                        }
1221
                        if ($GLOBALS['TCA'][$table]['ctrl']['label_alt']) {
1222
                            // Alternative Title-Fields
1223
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label_alt'];
1224
                        }
1225
                        if ($GLOBALS['TCA'][$table]['ctrl']['thumbnail']) {
1226
                            // Thumbnail
1227
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['thumbnail'];
@@ 1225-1228 (lines=4) @@
1222
                            // Alternative Title-Fields
1223
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['label_alt'];
1224
                        }
1225
                        if ($GLOBALS['TCA'][$table]['ctrl']['thumbnail']) {
1226
                            // Thumbnail
1227
                            $fields .= ',' . $GLOBALS['TCA'][$table]['ctrl']['thumbnail'];
1228
                        }
1229
                    }
1230
                    $queryBuilder = $this->getConnectionForTableName($table)
1231
                        ->createQueryBuilder();

typo3/sysext/backend/Classes/Utility/BackendUtility.php 2 locations

@@ 2325-2327 (lines=3) @@
2322
            $fields[] = $prefix . 't3ver_wsid';
2323
            $fields[] = $prefix . 't3ver_count';
2324
        }
2325
        if ($GLOBALS['TCA'][$table]['ctrl']['selicon_field']) {
2326
            $fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['selicon_field'];
2327
        }
2328
        if ($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) {
2329
            $fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
2330
        }
@@ 2328-2330 (lines=3) @@
2325
        if ($GLOBALS['TCA'][$table]['ctrl']['selicon_field']) {
2326
            $fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['selicon_field'];
2327
        }
2328
        if ($GLOBALS['TCA'][$table]['ctrl']['typeicon_column']) {
2329
            $fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['typeicon_column'];
2330
        }
2331
        if (is_array($GLOBALS['TCA'][$table]['ctrl']['enablecolumns'])) {
2332
            if ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']) {
2333
                $fields[] = $prefix . $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];

typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php 1 location

@@ 913-915 (lines=3) @@
910
    {
911
        $rowListArray = GeneralUtility::trimExplode(',', $rowList, true);
912
        // if no columns have been specified, show description (if configured)
913
        if (!empty($GLOBALS['TCA'][$table]['ctrl']['descriptionColumn']) && empty($rowListArray)) {
914
            $rowListArray[] = $GLOBALS['TCA'][$table]['ctrl']['descriptionColumn'];
915
        }
916
        $backendUser = $this->getBackendUserAuthentication();
917
        $lang = $this->getLanguageService();
918
        // Init

typo3/sysext/core/Classes/DataHandling/DataHandler.php 1 location

@@ 3793-3795 (lines=3) @@
3790
        // Force versioning related fields:
3791
        $row['pid'] = $pid;
3792
        // Setting original UID:
3793
        if ($GLOBALS['TCA'][$table]['ctrl']['origUid']) {
3794
            $row[$GLOBALS['TCA'][$table]['ctrl']['origUid']] = $uid;
3795
        }
3796
        // Do the copy by internal function
3797
        $theNewSQLID = $this->insertNewCopyVersion($table, $row, $pid);
3798
        if ($theNewSQLID) {