[BUGFIX] Fix wrong indentation of PageTree in MoveElements 15/50815/2
authorMichael Oehlhof <typo3@oehlhof.de>
Sun, 13 Nov 2016 20:46:15 +0000 (21:46 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Thu, 1 Dec 2016 10:42:32 +0000 (11:42 +0100)
Resolves: #78687
Releases: master, 7.6
Change-Id: Ibe5efa5b81e839f7bc608ca4adffe1aa2d2a9727
Reviewed-on: https://review.typo3.org/50815
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php

index 1b065de..4661b8a 100644 (file)
@@ -185,6 +185,9 @@ class PagePositionMap
                     }
                     // Then set the current prevPid
                     $prevPid = -$prev_dat['row']['pid'];
+                    if ($prevPid !== $dat['row']['pid']) {
+                        $lines[] = '</ul>';
+                    }
                 } else {
                     // In on the same level
                     $prevPid = -$prev_dat['row']['uid'];
@@ -195,9 +198,6 @@ class PagePositionMap
             }
             // print arrow on the same level
             if (!$this->dontPrintPageInsertIcons && $this->checkNewPageInPid($dat['row']['pid'])) {
-                if (!empty($prev_dat) && $prev_dat['invertedDepth'] < $dat['invertedDepth']) {
-                    $lines[] = '</ul>';
-                }
                 $lines[] = '<span class="text-nowrap"><a href="#" onclick="' . htmlspecialchars($this->onClickEvent($prevPid, $dat['row']['pid'], 3)) . '"><i class="t3-icon fa fa-long-arrow-left" title="' . $this->insertlabel() . '"></i></a></span>';
             }
             // The line with the icon and title: