[BUGFIX] Keep image order during upgrade 42/37042/4
authorNicole Cordes <typo3@cordes.co>
Fri, 20 Feb 2015 11:29:25 +0000 (12:29 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 21 Feb 2015 13:43:13 +0000 (14:43 +0100)
After upgrading from 4.5 to 6.2 the image sorting is messed. This patch
adds sorting rows to file references to keep the correct order. The sort
interval matches the default value of DataHandler.

Releases: 6.2
Resolves: #65193
Change-Id: I0e340d0fe422447ce6b8616be0297d6a7204b4fe
Reviewed-on: http://review.typo3.org/37042
Tested-by: Philipp Mueller <philipp.mueller@lavitto.ch>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/install/Classes/Updates/TceformsUpdateWizard.php

index 38389a3..c74487c 100644 (file)
@@ -351,7 +351,9 @@ class TceformsUpdateWizard extends AbstractUpdate {
                                        'uid_local' => $fileUid,
                                        'tablenames' => $table,
                                        'crdate' => time(),
-                                       'tstamp' => time()
+                                       'tstamp' => time(),
+                                       'sorting' => ($i + 256),
+                                       'sorting_foreign' => $i,
                                );
                                if (isset($titleTextField)) {
                                        $fields['title'] = trim($titleTextContents[$i]);