[TASK] Use static constant call for PageRepository 99/57599/2
authorBenni Mack <benni@typo3.org>
Fri, 13 Jul 2018 21:44:20 +0000 (23:44 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Sat, 14 Jul 2018 22:32:48 +0000 (00:32 +0200)
Minor fix to use the static constant directly, like in all other usages.

Resolves: #85559
Releases: master
Change-Id: I163bea97ddd78b6f37945daaf7aecaab6c47bdff
Reviewed-on: https://review.typo3.org/57599
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Joerg Boesche <typo3@joergboesche.de>
Tested-by: Joerg Boesche <typo3@joergboesche.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
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()