Fixed bug #6875: IRRE - Sorting of child records is inverted on moving parent record...
authorOliver Hader <oliver.hader@typo3.org>
Sun, 19 Jul 2009 13:35:23 +0000 (13:35 +0000)
committerOliver Hader <oliver.hader@typo3.org>
Sun, 19 Jul 2009 13:35:23 +0000 (13:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@5724 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tcemain.php

index b26acc5..f82703c 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-19  Oliver Hader  <oliver@typo3.org>
+
+       * Fixed bug #6875: IRRE - Sorting of child records is inverted on moving parent record to different page (thanks to Nabil Saleh)
+
 2009-07-09  Martin Kutschker  <masi@typo3.org>
 
        * Fixed bug: same error message is used twice for different errors
index be36cc0..dff05a3 100755 (executable)
@@ -3659,7 +3659,9 @@ class t3lib_TCEmain       {
 
                        // move the records
                if (isset($dbAnalysis)) {
-                       foreach ($dbAnalysis->itemArray as $v) {
+                               // Moving records to a positive destination will insert each
+                               // record at the beginning, thus the order is reversed here:
+                       foreach (array_reverse($dbAnalysis->itemArray) as $v) {
                                $this->moveRecord($v['table'],$v['id'],$destPid);
                        }
                }