Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Classes/Utility/UserAuthGroup.php
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,26 @@ protected function aclTraversePageTree($pid)
} else {
// in case there is no disallow ACL, add page ID to aclPageList
$this->aclPageList[$pid] = $pid;

// Add translated pages of the given $pid if there is no parent page.
// All other translated pages DO have a valid parent page (pid) set, EXCEPT pages on the first level!
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('pages');
$queryBuilder
->getRestrictions()
->removeAll()
->add(new DeletedRestriction());
$statement = $queryBuilder
->select('uid')
->from('pages')
->where(
$queryBuilder->expr()->eq('pid', $queryBuilder->createNamedParameter( 0, \PDO::PARAM_INT ) ),
$queryBuilder->expr()->eq('l10n_parent', $queryBuilder->createNamedParameter( $pid, \PDO::PARAM_INT ) )
)
->execute();

while ($result = $statement->fetch()) {
$this->aclPageList[$result['uid']] = $result['uid'];
}
}

// find subpages and call function itself again
Expand Down