Project

General

Profile

Feature #50391 ยป patch_disableCascadingDeleteForTypeInline.diff

Christoph Niewerth, 2013-07-24 16:13

View differences:

typo3/sysext/core/Classes/DataHandling/DataHandler.php
$dbAnalysis = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Database\\RelationHandler');
$dbAnalysis->start($value, $conf['foreign_table'], '', $uid, $table, $conf);
$dbAnalysis->undeleteRecord = TRUE;
$deleteChildRecords = !(isset($conf['behaviour']['disableCascadingDelete']) && $conf['behaviour']['disableCascadingDelete']);
// Walk through the items and remove them
foreach ($dbAnalysis->itemArray as $v) {
if (!$undeleteRecord) {
$this->deleteAction($v['table'], $v['id']);
if ($deleteChildRecords) {
$this->deleteAction($v['table'], $v['id']);
}
} else {
$this->undeleteRecord($v['table'], $v['id']);
}
    (1-1/1)