[BUGFIX] Collect correct information on elements in page 30/32330/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Sat, 23 Aug 2014 12:36:36 +0000 (14:36 +0200)
committerMarkus Klein <klein.t3@reelworx.at>
Sat, 23 Aug 2014 12:38:03 +0000 (14:38 +0200)
In the page module information on neighboring content elements is
collected while building the page layout. This information must be
remembered for other elements on the page instead of generated new when
rendering each element. This makes sure the move buttons and edit
buttons have the correct URLs.

Resolves: #60199
Releases: 6.3, 6.2, 6.1, 6.0, 4.7, 4.5
Change-Id: I9fec256b145fe8aba229d8b026fba73871942347
Reviewed-on: http://review.typo3.org/32330
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/cms/layout/class.tx_cms_layout.php

index 1f94d66..d7d2c21 100755 (executable)
@@ -2265,11 +2265,13 @@ class tx_cms_layout extends recordList {
         * @return void
         */
        protected function generateTtContentDataArray(array $rowArray) {
-               $this->tt_contentData = array(
-                       'nextThree' => array(),
-                       'next' => array(),
-                       'prev' => array(),
-               );
+               if (empty($this->tt_contentData)) {
+                       $this->tt_contentData = array(
+                               'nextThree' => array(),
+                               'next' => array(),
+                               'prev' => array(),
+                       );
+               }
                foreach ($rowArray as $key => $value) {
                        // Create the list of the next three ids (for editing links...)
                        for ($i = 0; $i < $this->nextThree; $i++) {