Bug #92442 » INP-1208-handle-hidden-preview-on-foreign-languages.patch
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbQueryParser.php | ||
---|---|---|
use TYPO3\CMS\Core\Database\Query\Expression\CompositeExpression;
|
||
use TYPO3\CMS\Core\Database\Query\Expression\ExpressionBuilder;
|
||
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
|
||
use TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer;
|
||
use TYPO3\CMS\Core\Domain\Repository\PageRepository;
|
||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
|
||
... | ... | |
/** @var ColumnMap $columnMap */
|
||
$relationTableName = (string)$columnMap->getRelationTableName();
|
||
$queryBuilderForSubselect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if ($this->environmentService->isEnvironmentInFrontendMode()) {
|
||
$queryBuilderForSubselect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$queryBuilderForSubselect
|
||
->select($columnMap->getParentKeyFieldName())
|
||
->from($relationTableName)
|
||
... | ... | |
// Build the SQL statement of the subselect
|
||
$queryBuilderForSubselect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if ($this->environmentService->isEnvironmentInFrontendMode()) {
|
||
$queryBuilderForSubselect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$queryBuilderForSubselect
|
||
->select($parentKeyFieldName)
|
||
->from($childTableName)
|
||
... | ... | |
$defLangTableAlias = $tableAlias . '_dl';
|
||
$defaultLanguageRecordsSubSelect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if ($this->environmentService->isEnvironmentInFrontendMode()) {
|
||
$defaultLanguageRecordsSubSelect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$defaultLanguageRecordsSubSelect
|
||
->select($defLangTableAlias . '.uid')
|
||
->from($tableName, $defLangTableAlias)
|
||
... | ... | |
// together with not translated default language records
|
||
$translatedOnlyTableAlias = $tableAlias . '_to';
|
||
$queryBuilderForSubselect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if ($this->environmentService->isEnvironmentInFrontendMode()) {
|
||
$queryBuilderForSubselect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$queryBuilderForSubselect
|
||
->select($translatedOnlyTableAlias . '.' . $transOrigPointerField)
|
||
->from($tableName, $translatedOnlyTableAlias)
|