[BUGFIX] Don't redirect when you click on "save and view" 95/47195/2
authorMarco Huber <mail@marco-huber.de>
Fri, 11 Mar 2016 14:24:53 +0000 (15:24 +0100)
committerFrank Naegler <frank.naegler@typo3.org>
Mon, 14 Mar 2016 08:24:50 +0000 (09:24 +0100)
Some more page types which should be opened directly and not
redirect to the rootpage if you click on "Save and view".

Resolves: #75020
Related: #66370
Releases: master, 7.6
Change-Id: I278a917c69565e8fe1e175901df01c4cccf9ef98
Reviewed-on: https://review.typo3.org/47195
Reviewed-by: Andreas Fernandez <typo3@scripting-base.de>
Tested-by: Andreas Fernandez <typo3@scripting-base.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index 5345df1..a6a3fbf 100644 (file)
@@ -830,7 +830,11 @@ class EditDocumentController extends AbstractModule
             $rootPageData = null;
             $rootLine = BackendUtility::BEgetRootLine($currentPageId);
             $currentPage = reset($rootLine);
-            if ((int)$currentPage['doktype'] === PageRepository::DOKTYPE_DEFAULT) {
+            if ((int)$currentPage['doktype'] === PageRepository::DOKTYPE_DEFAULT
+                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_LINK
+                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_SHORTCUT
+                || (int)$currentPage['doktype'] === PageRepository::DOKTYPE_MOUNTPOINT
+            ) {
                 // try the current page
                 $previewPageId = $currentPageId;
             } else {