Project

General

Profile

Bug #16642 » tcemain_2.diff

Administrator Admin, 2006-10-13 13:42

View differences:

typo3_work/TYPO3core/t3lib/class.t3lib_tcemain.php 2006-10-13 13:36:49.286289040 +0200
$old_pid_value = '';
$resetRejected = FALSE;
$this->autoVersioningUpdate = FALSE;
if (!t3lib_div::testInt($id)) {
// check if it's really a new record or just an annotation to an existing
// record that was created withing this session - if so, correct uid
if (isset($this->substNEWwithIDs[$id])) $id = $this->substNEWwithIDs[$id];
}
if (!t3lib_div::testInt($id)) { // Is it a new record? (Then Id is a string)
$fieldArray = $this->newFieldArray($table); // Get a fieldArray with default values
......
// Checking and finding numerical pid, it may be a string-reference to another value
$OK = 1;
if (strstr($pid_value,'NEW')) { // If a NEW... id
if (preg_match('/^-?NEW/', $pid_value)) { // If a NEW... id
if (substr($pid_value,0,1)=='-') {$negFlag=-1;$pid_value=substr($pid_value,1);} else {$negFlag=1;}
if (isset($this->substNEWwithIDs[$pid_value])) { // Trying to find the correct numerical value as it should be mapped by earlier processing of another new record.
$old_pid_value = $pid_value;
......
$diffStorageFlag = FALSE;
// Setting 'currentRecord' and 'checkValueRecord':
if (strstr($id,'NEW')) {
if (preg_match('/NEW/', $id)) {
$currentRecord = $checkValueRecord = $fieldArray; // must have the 'current' array - not the values after processing below...
// IF $incomingFieldArray is an array, overlay it.
......
t3lib_div::writeFile($eFile['editFile'],$SW_fileNewContent);
// Write status:
if (!strstr($id,'NEW') && $eFile['statusField']) {
if (!preg_match('/NEW/', $id) && $eFile['statusField']) {
$GLOBALS['TYPO3_DB']->exec_UPDATEquery(
$table,
'uid='.intval($id),
(2-2/2)