Code Duplication    Length = 6-6 lines in 2 locations

typo3/sysext/core/Classes/DataHandling/DataHandler.php 2 locations

@@ 4373-4378 (lines=6) @@
4370
        $resolvedPid = $this->resolvePid($table, $destPid);
4371
        // Finding out, if the record may be moved from where it is. If the record is a non-page, then it depends on edit-permissions.
4372
        // If the record is a page, then there are two options: If the page is moved within itself, (same pid) it's edit-perms of the pid. If moved to another place then its both delete-perms of the pid and new-page perms on the destination.
4373
        if ($table !== 'pages' || $resolvedPid == $moveRec['pid']) {
4374
            // Edit rights for the record...
4375
            $mayMoveAccess = $this->checkRecordUpdateAccess($table, $uid);
4376
        } else {
4377
            $mayMoveAccess = $this->doesRecordExist($table, $uid, 'delete');
4378
        }
4379
        // Finding out, if the record may be moved TO another place. Here we check insert-rights (non-pages = edit, pages = new), unless the pages are moved on the same pid, then edit-rights are checked
4380
        if ($table !== 'pages' || $resolvedPid != $moveRec['pid']) {
4381
            // Insert rights for the record...
@@ 4380-4385 (lines=6) @@
4377
            $mayMoveAccess = $this->doesRecordExist($table, $uid, 'delete');
4378
        }
4379
        // Finding out, if the record may be moved TO another place. Here we check insert-rights (non-pages = edit, pages = new), unless the pages are moved on the same pid, then edit-rights are checked
4380
        if ($table !== 'pages' || $resolvedPid != $moveRec['pid']) {
4381
            // Insert rights for the record...
4382
            $mayInsertAccess = $this->checkRecordInsertAccess($table, $resolvedPid, 4);
4383
        } else {
4384
            $mayInsertAccess = $this->checkRecordUpdateAccess($table, $uid);
4385
        }
4386
        // Checking if there is anything else disallowing moving the record by checking if editing is allowed
4387
        $fullLanguageCheckNeeded = $table !== 'pages';
4388
        $mayEditAccess = $this->BE_USER->recordEditAccessInternals($table, $uid, false, false, $fullLanguageCheckNeeded);