Skip to content

Commit deebdf2

Browse files
authored
Merge pull request #1 from bussard/main
Fix TYPO3 deprecation #85556 warning.
2 parents 63d2469 + 4670e88 commit deebdf2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Classes/XClass/PageRepository.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public function getRecordOverlay($table, $row, $sys_language_content = null, $OL
6969
$queryBuilder->setRestrictions(
7070
GeneralUtility::makeInstance(FrontendRestrictionContainer::class, $this->context)
7171
);
72-
if ($this->versioningWorkspaceId > 0) {
72+
if ($this->context->getPropertyFromAspect('workspace', 'id', 0) > 0) {
7373
// If not in live workspace, remove query based "enable fields" checks, it will be done in versionOL()
7474
// @see functional workspace test createLocalizedNotHiddenWorkspaceContentHiddenInLive()
7575
$queryBuilder->getRestrictions()->removeByType(HiddenRestriction::class);
@@ -82,7 +82,9 @@ public function getRecordOverlay($table, $row, $sys_language_content = null, $OL
8282
// versioned record (e.g. new version) or both (common for modifying, moving etc).
8383
if ($this->hasTableWorkspaceSupport($table)) {
8484
$queryBuilder->getRestrictions()->removeByType(FrontendWorkspaceRestriction::class);
85-
$queryBuilder->getRestrictions()->add(GeneralUtility::makeInstance(WorkspaceRestriction::class, $this->versioningWorkspaceId));
85+
$queryBuilder->getRestrictions()->add(
86+
GeneralUtility::makeInstance(WorkspaceRestriction::class,
87+
$this->context->getPropertyFromAspect('workspace', 'id', 0)));
8688
$queryBuilder->orderBy('t3ver_wsid', 'ASC');
8789
}
8890
}

0 commit comments

Comments
 (0)