Bug #16166 » 3531_t3lib_tcemain-all-tables.diff
t3lib/class.t3lib_tcemain.php (.../branches/bug-3531) (Revision 79) | ||
---|---|---|
}
|
||
}
|
||
// traverse through all columns and check for mm-refs to update
|
||
foreach ($TCA[$table]['columns'] as $col) {
|
||
if ($col['config']['MM'] != '') {
|
||
// first swap the records for the new element to the negative uid
|
||
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($col['config']['MM'], 'uid_foreign='.$swapWith, Array('uid_foreign' => -$swapWith));
|
||
|
||
// then swap the old record to the new uid
|
||
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($col['config']['MM'], 'uid_foreign='.$id, Array('uid_foreign' => $swapWith));
|
||
|
||
// and then finally swap the new record to the old uid
|
||
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($col['config']['MM'], 'uid_foreign=-'.$swapWith, Array('uid_foreign' => $id));
|
||
}
|
||
}
|
||
|
||
if (!count($sqlErrors)) {
|
||
// Checking for delete:
|