--- class.t3lib_tcemain.php Mon Apr 2 23:41:34 2007 +++ class.t3lib_tcemain_mmpatch.php Mon Jun 11 18:27:43 2007 @@ -796,6 +796,9 @@ $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); } @@ -3967,7 +3970,21 @@ 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: