Project

General

Profile

Feature #58611 » typo3-cms-core-disable-copying-children-with-parent.patch

Mathias Brodala, 2020-10-26 14:49

View differences:

Classes/DataHandling/DataHandler.php 2020-10-26 14:40:40.797154344 +0100
// Process references and files, currently that means only the files, prepending absolute paths (so the DataHandler engine will detect the file as new and one that should be made into a copy)
$value = $this->copyRecord_procFilesRefs($conf, $uid, $value);
$inlineSubType = $this->getInlineFieldType($conf);
$copyChildrenWithParent = $conf['behaviour']['copyChildrenWithParent'] ?? true;
// Get the localization mode for the current (parent) record (keep|select):
// Register if there are references to take care of or MM is used on an inline field (no change to value):
if ($this->isReferenceField($conf) || $inlineSubType === 'mm') {
$value = $this->copyRecord_processManyToMany($table, $uid, $field, $value, $conf, $language);
if ($copyChildrenWithParent) {
$value = $this->copyRecord_processManyToMany($table, $uid, $field, $value, $conf, $language);
} else {
$value = 0;
}
} elseif ($inlineSubType !== false) {
$value = $this->copyRecord_processInline($table, $uid, $field, $value, $row, $conf, $realDestPid, $language, $workspaceOptions);
if ($copyChildrenWithParent) {
$value = $this->copyRecord_processInline($table, $uid, $field, $value, $row, $conf, $realDestPid, $language, $workspaceOptions);
} else {
$value = 0;
}
}
// For "flex" fieldtypes we need to traverse the structure for two reasons: If there are file references they have to be prepended with absolute paths and if there are database reference they MIGHT need to be remapped (still done in remapListedDBRecords())
if ($conf['type'] === 'flex') {
(2-2/2)