[BUGFIX] Fix mountpoint overlay detection 79/35079/2
authorAlexander Stehlik <alexander.stehlik@gmail.com>
Fri, 5 Dec 2014 18:10:23 +0000 (19:10 +0100)
committerMarkus Klein <klein.t3@reelworx.at>
Fri, 5 Dec 2014 23:49:03 +0000 (00:49 +0100)
This is a follow up to 963eb99e7d7f9ab3d4a50153412f0ed3b927b5e5.
The comparison for the doktype needs to be non strict because
the database row contains a string and the constant is an integer.

Releases: master
Resolves: #59382
Change-Id: I7727e6bfb8c3475602f576f6259824cf1c7d2ca3
Reviewed-on: http://review.typo3.org/35079
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 36d6018..fd08dbd 100644 (file)
@@ -1495,7 +1495,7 @@ class TypoScriptFrontendController {
                // If the page is a mountpoint which should be overlaid with the contents of the mounted page,
                // it must never be accessible directly, but only in the mountpoint context. Therefore we change
                // the current ID and the user is redirected by checkPageForMountpointRedirect().
-               if ($this->page['doktype'] === PageRepository::DOKTYPE_MOUNTPOINT && $this->page['mount_pid_ol']) {
+               if ($this->page['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT && $this->page['mount_pid_ol']) {
                        $this->originalMountPointPage = $this->page;
                        $this->page = $this->sys_page->getPage($this->page['mount_pid']);
                        if (empty($this->page)) {
@@ -2989,7 +2989,7 @@ class TypoScriptFrontendController {
         * @return void
         */
        public function checkPageForMountpointRedirect() {
-               if (!empty($this->originalMountPointPage) && $this->originalMountPointPage['doktype'] === PageRepository::DOKTYPE_MOUNTPOINT) {
+               if (!empty($this->originalMountPointPage) && $this->originalMountPointPage['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT) {
                        $this->redirectToCurrentPage();
                }
        }