[TASK] Use static constant call for PageRepository
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Middleware / ShortcutAndMountPointRedirect.php
index f0f78a9..691e125 100644 (file)
@@ -22,6 +22,7 @@ use Psr\Http\Server\RequestHandlerInterface;
 use TYPO3\CMS\Core\Http\RedirectResponse;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController;
+use TYPO3\CMS\Frontend\Page\PageRepository;
 
 /**
  * Checks mount points, shortcuts and redirects to the target.
@@ -49,7 +50,7 @@ class ShortcutAndMountPointRedirect implements MiddlewareInterface
 
         // See if the current page is of doktype "External URL", if so, do a redirect as well.
         if (empty($this->controller->config['config']['disablePageExternalUrl'] ?? null)
-            && $this->controller->sys_page::DOKTYPE_LINK === (int)$this->controller->page['doktype']) {
+            && PageRepository::DOKTYPE_LINK === (int)$this->controller->page['doktype']) {
             $externalUrl = $this->prefixExternalPageUrl(
                 $this->controller->page['url'],
                 $request->getAttribute('normalizedParams')->getSiteUrl()