Code Duplication    Length = 3-3 lines in 3 locations

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

@@ 7838-7840 (lines=3) @@
7835
    public function deleteClause($table)
7836
    {
7837
        // Returns the proper delete-clause if any for a table from TCA
7838
        if (!$this->disableDeleteClause && $GLOBALS['TCA'][$table]['ctrl']['delete']) {
7839
            return ' AND ' . $table . '.' . $GLOBALS['TCA'][$table]['ctrl']['delete'] . '=0';
7840
        }
7841
        return '';
7842
    }
7843

typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php 2 locations

@@ 711-713 (lines=3) @@
708
            if (!empty($enableFieldsToBeIgnored)) {
709
                // array_combine() is necessary because of the way \TYPO3\CMS\Frontend\Page\PageRepository::enableFields() is implemented
710
                $statement .= $this->getPageRepository()->enableFields($tableName, -1, array_combine($enableFieldsToBeIgnored, $enableFieldsToBeIgnored));
711
            } elseif (!empty($GLOBALS['TCA'][$tableName]['ctrl']['delete'])) {
712
                $statement .= ' AND ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] . '=0';
713
            }
714
        } elseif (!$ignoreEnableFields && !$includeDeleted) {
715
            $statement .= $this->getPageRepository()->enableFields($tableName);
716
        } elseif (!$ignoreEnableFields && $includeDeleted) {
@@ 736-738 (lines=3) @@
733
        if (!$ignoreEnableFields) {
734
            $statement .= BackendUtility::BEenableFields($tableName);
735
        }
736
        if (!$includeDeleted && !empty($GLOBALS['TCA'][$tableName]['ctrl']['delete'])) {
737
            $statement .= ' AND ' . $tableName . '.' . $GLOBALS['TCA'][$tableName]['ctrl']['delete'] . '=0';
738
        }
739
        return $statement;
740
    }
741