Bug #21657 ยป 0012719-copymovedeleteL10nRecordsWithVersions.patch
t3lib/class.t3lib_tcemain.php (working copy) | ||
---|---|---|
if (!t3lib_BEfunc::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) {
|
||
return;
|
||
}
|
||
t3lib_div::loadTCA($table);
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid);
|
||
$where = '';
|
||
if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
|
||
$where = ' AND t3ver_oid=0';
|
||
}
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
|
||
if (is_array($l10nRecords)) {
|
||
foreach ($l10nRecords as $record) {
|
||
$this->copyRecord($table, $record['uid'], $destPid, $first, $overrideValues, $excludeFields, $record[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
|
||
... | ... | |
if (!t3lib_BEfunc::isTableLocalizable($table) || !empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable'])) {
|
||
return;
|
||
}
|
||
t3lib_div::loadTCA($table);
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid);
|
||
$where = '';
|
||
if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
|
||
$where = ' AND t3ver_oid=0';
|
||
}
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
|
||
if (is_array($l10nRecords)) {
|
||
foreach ($l10nRecords as $record) {
|
||
$this->moveRecord($table, $record['uid'], $destPid);
|
||
... | ... | |
return;
|
||
}
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid);
|
||
$where = '';
|
||
if (isset($GLOBALS['TCA'][$table]['ctrl']['versioningWS'])) {
|
||
$where = ' AND t3ver_oid=0';
|
||
}
|
||
$l10nRecords = t3lib_BEfunc::getRecordsByField($table, $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'], $uid, $where);
|
||
if (is_array($l10nRecords)) {
|
||
foreach($l10nRecords as $record) {
|
||
$this->deleteAction($table, intval($record['t3ver_oid']) > 0 ? intval($record['t3ver_oid']) : intval($record['uid']));
|