[BUGFIX] Enable page tree filter for admin with mountpoints 17/42617/5
authorNicole Cordes <typo3@cordes.co>
Fri, 14 Aug 2015 14:17:45 +0000 (16:17 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Fri, 4 Sep 2015 11:20:20 +0000 (13:20 +0200)
The patch prevents the mountpoint processing during page tree filtering
for admin users. This is necessary because admin users aren't limited
to the mountpoints. Otherwise sites outside the mountpoints aren't
found anymore.

Resolves: #69063
Releases: master, 6.2
Change-Id: Ie55dcc3b05463deaf57ba42c91e229225176be8a
Reviewed-on: http://review.typo3.org/42617
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Alexander Opitz <opitz.alexander@googlemail.com>
Tested-by: Alexander Opitz <opitz.alexander@googlemail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php

index 6f2b0d4..61e1d33 100644 (file)
@@ -234,10 +234,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
 
                        $rootline = BackendUtility::BEgetRootLine($record['uid'], '', $GLOBALS['BE_USER']->workspace != 0);
                        $rootline = array_reverse($rootline);
-                       if ($nodeId === 0) {
-                               array_shift($rootline);
-                       }
-                       if ($mountPoints != array(0)) {
+                       if (!in_array(0, $mountPoints, TRUE)) {
                                $isInsideMountPoints = FALSE;
                                foreach ($rootline as $rootlineElement) {
                                        if (in_array((int)$rootlineElement['uid'], $mountPoints, TRUE)) {