Skip to content

Commit

Permalink
[TASK] Remove isFrontendEditingActive check
Browse files Browse the repository at this point in the history
This change removed the `isFrontendEditingActive` check,
because it uses TSFE properties, which have been removed
in TYPO3 v12.0
  • Loading branch information
derhansen committed Oct 17, 2024
1 parent af4f99f commit 5a68261
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
2 changes: 0 additions & 2 deletions Classes/Hooks/PageLoadedFromCacheHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public function handleEvent(AfterTypoScriptDeterminedEvent $event): void
$context->getPropertyFromAspect('workspace', 'isOffline', false) === false &&
strpos($uri, '?') === false &&
$this->isAdminPanelVisible($frontendTypoScript) === false &&
$this->isFrontendEditingActive($tsfe) === false &&
$request->getMethod() === 'GET'
);

Expand Down Expand Up @@ -110,7 +109,6 @@ public function loadedFromCache(array &$params, TypoScriptFrontendController $ts
$context->getPropertyFromAspect('workspace', 'isOffline', false) === false &&
strpos($uri, '?') === false &&
$this->isAdminPanelVisible() === false &&
$this->isFrontendEditingActive($tsfe) === false &&
$request->getMethod() === 'GET'
);

Expand Down
11 changes: 0 additions & 11 deletions Classes/Hooks/RequestAwareTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,6 @@ protected function isAdminPanelVisible(?FrontendTypoScript $frontendTypoScript =
);
}

protected function isFrontendEditingActive(TypoScriptFrontendController $frontendController): bool
{
return (
/* Note: we do not use $GLOBALS['BE_USER']->isFrontendEditingActive() as that checks
* additional for adminPanel->isAdminModuleEnabled('edit'), but that has no influence
* on cache clearing. */
$frontendController->displayEditIcons == 1 ||
$frontendController->displayFieldEditIcons == 1
);
}

protected function getUri(ServerRequestInterface $request): string
{
$normalizedParams = $this->getNormalizedParams($request);
Expand Down
1 change: 0 additions & 1 deletion Classes/Hooks/SetPageCacheHook.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public function set(array $params, FrontendInterface $frontend): void
$tsfe !== null &&
$tsfe->isStaticCacheble($request) &&
$context->getPropertyFromAspect('workspace', 'isOffline', false) === false &&
$this->isFrontendEditingActive($tsfe) === false &&
in_array('nginx_cache_ignore', $tags, true) === false
);

Expand Down

0 comments on commit 5a68261

Please sign in to comment.