[BUGFIX] Fix page tree mountpoint path 84/50384/2
authorMichael Stucki <michael.stucki@typo3.org>
Thu, 1 Sep 2016 13:27:32 +0000 (15:27 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 26 Oct 2016 14:37:04 +0000 (16:37 +0200)
If options.pageTree.showPathAboveMounts is enabled in
UserTS, don't add the name of the mountpoint startpage to
this path.

Resolves: #77734
Releases: master, 7.6
Change-Id: I68da82778921ac37e6b827ab8b6ca21993cf6491
Reviewed-on: https://review.typo3.org/50384
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php

index e486d67..2e8fd81 100644 (file)
@@ -154,7 +154,11 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider
                 $subNode = Commands::getNewNode($subpage, $mountPoint);
                 $subNode->setIsMountPoint($isMountPoint);
                 if ($isMountPoint && $this->showRootlineAboveMounts) {
-                    $rootline = Commands::getMountPointPath($subpage['uid']);
+                    if ($subpage['pid'] > 0) {
+                        $rootline = Commands::getMountPointPath($subpage['pid']);
+                    } else {
+                        $rootline = Commands::getMountPointPath($subpage['uid']);
+                    }
                     $subNode->setReadableRootline($rootline);
                 }
                 if ($this->nodeCounter < $this->nodeLimit) {