Project

General

Profile

Bug #16393 » tcemain_patch4_1_1.diff

Administrator Admin, 2007-06-14 11:53

View differences:

class.t3lib_tcemain_mmpatch.php Mon Jun 11 18:27:43 2007
$fieldArray['t3ver_swapmode'] = $versioningType;
}
$phShadowId = $this->insertDB($table,$id,$fieldArray,TRUE,0,TRUE); // When inserted, $this->substNEWwithIDs[$id] will be changed to the uid of THIS version and so the interface will pick it up just nice!
// NSA ZACH PATCH BEGIN
$this->substNEWwithIDs[$id] = $phShadowId;
// NSA ZACH PATCH END
if ($phShadowId) {
$this->placeholderShadowing($table,$phShadowId);
}
......
unlink($lockFileName);
}
}
// NSA ZACH ADD BEGIN -- we need to replace the MM relations in the live record with the MM relations in the draft record. This should do it.
// $id = placeHolder / live record UID
// $swapWith = draft (correct) UID
$row = $this->recordInfo($table,intval($swapWith),'*');
foreach($row as $field => $value) {
$conf = $TCA[$table]['columns'][$field]['config'];
if (is_array($conf)) {
if($conf['MM'] == true) {
$str = $this->copyRecord_procBasedOnFieldType($table,$swapWith,$field,$value,$row,$conf,$swapVersion['pid']);
$valueArr = explode(',',$str);
$this->checkValue_group_select_processDBdata($valueArr,$conf,$id,'update',$conf['type'],$table);
}
}
}
// NSA ZACH ADD END
if (!count($sqlErrors)) {
// Checking for delete:
(2-2/6)