Fixed bug #11539: t3ver_stage will not be resetted when t3ver_stage was >0 before
authorRupert Germann <rupi@gmx.li>
Wed, 5 Aug 2009 10:25:56 +0000 (10:25 +0000)
committerRupert Germann <rupi@gmx.li>
Wed, 5 Aug 2009 10:25:56 +0000 (10:25 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5762 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index 0f9b253..1501852 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
-2009-07-31  Rupert Germann  <rupi@gmx.li>
+2009-08-05  Rupert Germann  <rupi@gmx.li>
 
+       * Fixed bug #11539: t3ver_stage will not be resetted when t3ver_stage was >0 before (thanks to Fabrizio Branca)
        * Fixed #11430: Performance improvement: use $GLOBALS['EXEC_TIME'] instead of time() where it makes sense (Thanks to Niels Pardon)
 
 2009-08-04  Michael Stucki  <michael@typo3.org>
index 3e16fc5..dc3386c 100644 (file)
@@ -652,7 +652,6 @@ class t3lib_TCEmain {
                                                $createNewVersion = FALSE;
                                                $recordAccess = FALSE;
                                                $old_pid_value = '';
-                                               $resetRejected = FALSE;
                                                $this->autoVersioningUpdate = FALSE;
 
                                                if (!t3lib_div::testInt($id)) {               // Is it a new record? (Then Id is a string)
@@ -744,11 +743,6 @@ class t3lib_TCEmain        {
                                                                        $tempdata = $this->recordInfo($table,$id,'pid'.($TCA[$table]['ctrl']['versioningWS']?',t3ver_wsid,t3ver_stage':''));
                                                                        $theRealPid = $tempdata['pid'];
 
-                                                                               // Prepare the reset of the rejected flag if set:
-                                                                       if ($TCA[$table]['ctrl']['versioningWS'] && $tempdata['t3ver_stage']<0) {
-                                                                               $resetRejected = TRUE;
-                                                                       }
-
                                                                        // Use the new id of the versionized record we're trying to write to:
                                                                                // (This record is a child record of a parent and has already been versionized.)
                                                                        if ($this->autoVersionIdMap[$table][$id]) {
@@ -854,7 +848,7 @@ class t3lib_TCEmain {
                                                                        $newVersion_placeholderFieldArray[$TCA[$table]['ctrl']['tstamp']] = $GLOBALS['EXEC_TIME'];
                                                                }
                                                        }
-                                                       if ($resetRejected)     {
+                                                       if ($TCA[$table]['ctrl']['versioningWS']) {
                                                                $fieldArray['t3ver_stage'] = 0;
                                                        }