[BUGFIX] Don't redirect when you click on "save and view" 36/47236/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:30:31 +0000 (09:30 +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/47236
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/backend/Classes/Controller/EditDocumentController.php

index f84c7c0..fd86b11 100644 (file)
@@ -844,7 +844,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 {