Code Duplication    Length = 6-9 lines in 2 locations

typo3/sysext/backend/Classes/Controller/LinkBrowserController.php 1 location

@@ 158-166 (lines=9) @@
155
        $browserParameters = $this->parameters;
156
        if (isset($browserParameters['pid'])) {
157
            $pageId = $browserParameters['pid'];
158
        } elseif (isset($browserParameters['itemName'])) {
159
            // parse data[<table>][<uid>]
160
            if (preg_match('~data\[([^]]*)\]\[([^]]*)\]~', $browserParameters['itemName'], $matches)) {
161
                $recordArray = BackendUtility::getRecord($matches['1'], $matches['2']);
162
                if (is_array($recordArray)) {
163
                    $pageId = $recordArray['pid'];
164
                }
165
            }
166
        }
167
        return (int)BackendUtility::getTSCpidCached($browserParameters['table'], $browserParameters['uid'], $pageId)[0];
168
    }
169
}

typo3/sysext/impexp/Classes/Controller/ImportExportController.php 1 location

@@ 422-427 (lines=6) @@
419
            $beUser->user['email']
420
        );
421
        // Configure which records to export
422
        if (is_array($inData['record'])) {
423
            foreach ($inData['record'] as $ref) {
424
                $rParts = explode(':', $ref);
425
                $this->export->export_addRecord($rParts[0], BackendUtility::getRecord($rParts[0], $rParts[1]));
426
            }
427
        }
428
        // Configure which tables to export
429
        if (is_array($inData['list'])) {
430
            foreach ($inData['list'] as $ref) {