[BUGFIX] Remove superfluous Doctrine restriction check 12/57512/4
authorBenni Mack <benni@typo3.org>
Mon, 9 Jul 2018 10:37:39 +0000 (12:37 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 9 Jul 2018 11:26:27 +0000 (13:26 +0200)
Similar to https://review.typo3.org/#/c/57434/
the check for TSFE->showHiddenRecords is unneeded
as the RestrictionContainer evaluates this information
(now done via aspects) directly anyway.

Resolves: #85516
Releases: master
Change-Id: Icc88b1995fe603f3707c9a83e83bf03ff549422e
Reviewed-on: https://review.typo3.org/57512
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/Collection/RecordCollectionRepository.php

index 9ba0b33..443e67a 100644 (file)
@@ -17,7 +17,6 @@ namespace TYPO3\CMS\Core\Collection;
 use TYPO3\CMS\Core\Database\ConnectionPool;
 use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
 use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
-use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 
 /**
@@ -60,9 +59,6 @@ class RecordCollectionRepository
 
         if ($this->getEnvironmentMode() === 'FE') {
             $queryBuilder->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
-            if ($GLOBALS['TSFE']->showHiddenRecords) {
-                $queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
-            }
         } else {
             $queryBuilder->getRestrictions()
                 ->removeAll()