[BUGFIX] Show splitview only in non-live workspace
authorTolleiv Nietsch <info@tolleiv.de>
Thu, 14 Jul 2011 20:24:19 +0000 (22:24 +0200)
committerTolleiv Nietsch <info@tolleiv.de>
Thu, 14 Jul 2011 20:32:56 +0000 (22:32 +0200)
As a result of #13518 the split-view opens up always.
This fix makes sure that we're in a non-live workspace
before it replaces the viewOnClick URL

Change-Id: I69b22083e5d03242aa597f91f0db3c547ad67f61
Resolves: #28262
Releases: 4.6

typo3/sysext/workspaces/Classes/Service/Befunc.php

index 023bad1..aaa87a8 100644 (file)
@@ -46,7 +46,9 @@ class tx_Workspaces_Service_Befunc {
         * @return void
         */
        public function preProcess(&$pageUid, $backPath, $rootLine, $anchorSection, &$viewScript, $additionalGetVars, $switchFocus) {
-               $viewScript = $this->getWorkspaceService()->generateWorkspaceSplittedPreviewLink($pageUid);
+               if ($GLOBALS['BE_USER']->workspace !== 0) {
+                       $viewScript = $this->getWorkspaceService()->generateWorkspaceSplittedPreviewLink($pageUid);
+               }
        }
 
        /**