Project

General

Profile

Bug #22680 ยป 0014431_patch.diff

Administrator Admin, 2010-06-16 16:59

View differences:

class.t3lib_tcemain.php 2010-06-16 15:52:58.000000000 +0100
'swapVersion'=>$swapVersion
)));
$swapVersion['pid'] = intval($curVersion['pid']); // Set pid for ONLINE
// Find fields to keep
$keepFields = $this->getUniqueFields($table);
if ($TCA[$table]['ctrl']['sortby']) {
......
// Modify offline version to become online:
$tmp_wsid = $swapVersion['t3ver_wsid'];
$swapVersion['pid'] = intval($curVersion['pid']); // Set pid for ONLINE
$swapVersion['t3ver_oid'] = 0; // We clear this because t3ver_oid only make sense for offline versions and we want to prevent unintentional misuse of this value for online records.
$swapVersion['t3ver_wsid'] = $swapIntoWS ? ($t3ver_state['swapVersion']>0 ? $this->BE_USER->workspace : intval($curVersion['t3ver_wsid'])) : 0; // In case of swapping and the offline record has a state (like 2 or 4 for deleting or move-pointer) we set the current workspace ID so the record is not deselected in the interface by t3lib_BEfunc::versioningPlaceholderClause()
$swapVersion['t3ver_tstamp'] = $GLOBALS['EXEC_TIME'];
    (1-1/1)