Bug #93336 ยป 93336-ws-preview-translated.patch

Sebastian Michaelsen, 2021-01-21 09:56

View differences:

typo3/sysext/core/Classes/Domain/Repository/PageRepository.php
27 27
use TYPO3\CMS\Core\Database\ConnectionPool;
28 28
use TYPO3\CMS\Core\Database\Query\QueryHelper;
29 29
use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
30
use TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction;
30 31
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendGroupRestriction;
31 32
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
32 33
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendWorkspaceRestriction;
33 34
use TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction;
34 35
use TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionContainerInterface;
36
use TYPO3\CMS\Core\Database\Query\Restriction\StartTimeRestriction;
35 37
use TYPO3\CMS\Core\Database\Query\Restriction\WorkspaceRestriction;
36 38
use TYPO3\CMS\Core\Error\Http\ShortcutTargetPageNotFoundException;
37 39
use TYPO3\CMS\Core\Utility\GeneralUtility;
......
619 621
                    $queryBuilder->setRestrictions(
620 622
                        GeneralUtility::makeInstance(FrontendRestrictionContainer::class, $this->context)
621 623
                    );
624

  
625
                    if ($this->versioningWorkspaceId) {
626
                        // if versioning is requested, remove the enable field checks, it will be done in versionOL()
627
                        $queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
628
                        $queryBuilder->getRestrictions()->removeByType(StartTimeRestriction::class);
629
                        $queryBuilder->getRestrictions()->removeByType(EndTimeRestriction::class);
630
                    }
631

  
622 632
                    $olrow = $queryBuilder->select('*')
623 633
                        ->from($table)
624 634
                        ->where(
    (1-1/1)