[BUGFIX] Do not show sysfolders on pid 0 in sites module 04/56604/2
authorMathias Schreiber <mathias.schreiber@typo3.org>
Sun, 8 Apr 2018 08:50:51 +0000 (10:50 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Mon, 9 Apr 2018 20:42:26 +0000 (22:42 +0200)
Pages of the doktype “sys_folder” are no longer shown as valid entrypoints
into a site.

Resolves: #84663
Releases: master
Change-Id: I92fa2966ccf9319df52d656a30ec35a767c2dd21
Reviewed-on: https://review.typo3.org/56604
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
typo3/sysext/backend/Classes/Controller/SiteConfigurationController.php

index de8ea40..fc6ce40 100644 (file)
@@ -42,6 +42,7 @@ use TYPO3\CMS\Core\Site\Entity\Site;
 use TYPO3\CMS\Core\Site\SiteFinder;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\View\StandaloneView;
+use TYPO3\CMS\Frontend\Page\PageRepository;
 use TYPO3Fluid\Fluid\View\ViewInterface;
 
 /**
@@ -605,7 +606,10 @@ class SiteConfigurationController
             ->where(
                 $queryBuilder->expr()->eq('sys_language_uid', 0),
                 $queryBuilder->expr()->orX(
-                    $queryBuilder->expr()->eq('pid', 0),
+                    $queryBuilder->expr()->andX(
+                        $queryBuilder->expr()->eq('pid', 0),
+                        $queryBuilder->expr()->neq('doktype', PageRepository::DOKTYPE_SYSFOLDER)
+                    ),
                     $queryBuilder->expr()->eq('is_siteroot', 1)
                 )
             )