Changed loop variable name in TCEMain because it could corrupt information passed...
authorDmitry Dulepov <dmitry.dulepov@gmail.com>
Fri, 20 Apr 2007 16:47:07 +0000 (16:47 +0000)
committerDmitry Dulepov <dmitry.dulepov@gmail.com>
Fri, 20 Apr 2007 16:47:07 +0000 (16:47 +0000)
Fixed workspace publishing error that may happen when "Element" versioning type is used

git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@2263 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index d560b56..a4e5f3d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,8 @@
 2007-04-18  Dmitry Dulepov  <dmitry@typo3.org>
 
        * Fixed bug #1839: Broken Rootline when a Editor view a Page that is not online
+       * Changed loop variable name in TCEMain because it could corrupt information passed to post-processing hook
+       * Fixed workspace publishing error that may happen when "Element" versioning type is used
 
 2007-04-19     Thomas Hempel   <thomas@work.de>
        
index 0bf51fe..b205293 100755 (executable)
@@ -2347,8 +2347,8 @@ class t3lib_TCEmain       {
                                                                                        $elementList[$table][] = array($id, $value['swapWith']);
                                                                                }
                                                                                foreach ($elementList as $tbl => $idList) {
-                                                                                       foreach ($idList as $id) {
-                                                                                               $this->version_swap($tbl,$id[0],$id[1],$value['swapIntoWS']);
+                                                                                       foreach ($idList as $idSet) {
+                                                                                               $this->version_swap($tbl,$idSet[0],$idSet[1],$value['swapIntoWS']);
                                                                                        }
                                                                                }
                                                                        break;
@@ -3147,7 +3147,7 @@ class t3lib_TCEmain       {
                                        $this->log($table,$uid,4,0,1,"Attempt to move record '%s' (%s) without having permissions to do so",14,array($propArr['header'],$table.':'.$uid),$propArr['event_pid']);
                                }
                        } else {
-                               $this->newlog("Move attempt failed due to workspace restrictions: ".implode(' ',$workspaceAccessBlocked),1);
+                               $this->newlog("Move attempt failed due to workspace restrictions: ".implode(' ',$workspaceAccessBlocked),1);
                        }
                }
        }
@@ -3780,6 +3780,7 @@ class t3lib_TCEmain       {
                                                                        '1'
                                                                );
                                                                list($highestVerNumber) = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);
+                                                               $GLOBALS['TYPO3_DB']->sql_free_result($res);
 
                                                                        // Look for version number of the current:
                                                                $subVer = $row['t3ver_id'].'.'.($highestVerNumber+1);
@@ -6391,7 +6392,7 @@ State was change by %s (username: %s)
                                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
                                }
                        }
-                       if ($offlinePageId != $pageId) {
+                       if ($offlinePageId && $offlinePageId != $pageId) {
                                $elementData['pages'][] = array($pageId, $offlinePageId);
                        }
                }