[FOLLOWUP][BUGFIX] dont set fePreview=2 with ADMCMD_noBeUser 63/39863/3
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Mon, 1 Jun 2015 12:51:08 +0000 (14:51 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Mon, 1 Jun 2015 13:01:16 +0000 (15:01 +0200)
Restructure the nested condition for the sake of readability.

Releases: master, 6.2
Resolves: #67224
Change-Id: I25161348509245dee56b61f3a1f15d9bc778500b
Reviewed-on: http://review.typo3.org/39863
Reviewed-by: Xavier Perseguers <xavier@typo3.org>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php

index 9d3e0f1..12934b0 100644 (file)
@@ -1286,7 +1286,18 @@ class TypoScriptFrontendController {
                                }
                        }
                        // The preview flag will be set if a backend user is in an offline workspace
-                       if (($GLOBALS['BE_USER']->user['workspace_preview'] || GeneralUtility::_GP('ADMCMD_view') || $this->doWorkspacePreview()) && ($this->whichWorkspace() === -1 || $this->whichWorkspace() > 0) && (!GeneralUtility::_GP('ADMCMD_noBeUser'))) {
+                       if (
+                                       (
+                                               $GLOBALS['BE_USER']->user['workspace_preview']
+                                               || GeneralUtility::_GP('ADMCMD_view')
+                                               || $this->doWorkspacePreview()
+                                       )
+                                       && (
+                                               $this->whichWorkspace() === -1
+                                               || $this->whichWorkspace() > 0
+                                       )
+                                       && !GeneralUtility::_GP('ADMCMD_noBeUser')
+                       ) {
                                // Will show special preview message.
                                $this->fePreview = 2;
                        }