Bug #92442 » INP-1208-handle-hidden-preview-on-foreign-languages.patch
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\Http\ApplicationType;
|
||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||
... | ... | |
/** @var ColumnMap $columnMap */
|
||
$relationTableName = (string)$columnMap->getRelationTableName();
|
||
$queryBuilderForSubselect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()) {
|
||
$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 (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()) {
|
||
$queryBuilderForSubselect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$queryBuilderForSubselect
|
||
->select($parentKeyFieldName)
|
||
->from($childTableName)
|
||
... | ... | |
$defLangTableAlias = $tableAlias . '_dl';
|
||
$defaultLanguageRecordsSubSelect = $this->queryBuilder->getConnection()->createQueryBuilder();
|
||
if (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()) {
|
||
$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 (ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isFrontend()) {
|
||
$queryBuilderForSubselect->setRestrictions(GeneralUtility::makeInstance(FrontendRestrictionContainer::class));
|
||
}
|
||
$queryBuilderForSubselect
|
||
->select($translatedOnlyTableAlias . '.' . $transOrigPointerField)
|
||
->from($tableName, $translatedOnlyTableAlias)
|
- « Previous
- 1
- 2
- 3
- 4
- Next »