Fixed bug #14946: Switching workplaces causes nesting of BE (Thanks to Stefan Galinski)
authorSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jul 2010 21:29:13 +0000 (21:29 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Tue, 27 Jul 2010 21:29:13 +0000 (21:29 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@8297 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/backend.php
typo3/js/backend.js
typo3/js/workspacemenu.js

index 348e02f..7a85b2d 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-07-27  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #14946: Switching workplaces causes nesting of BE (Thanks to Stefan Galinski)
        * Fixed bug #13649: Deprecated function sql_regcase in cms/tslib/class.tslib_pagegen.php (Thanks to Martin Müller)
 
 2010-07-27  Susanne Moog  <typo3@susanne-moog.de>
index 2e8df64..23ee726 100644 (file)
@@ -357,6 +357,9 @@ class TYPO3backend {
                        // If another page module was specified, replace the default Page module with the new one
                $newPageModule = trim($GLOBALS['BE_USER']->getTSConfigVal('options.overridePageModule'));
                $pageModule    = t3lib_BEfunc::isModuleSetInTBE_MODULES($newPageModule) ? $newPageModule : 'web_layout';
+               if (!$GLOBALS['BE_USER']->check('modules', $pageModule)) {
+                       $pageModule = '';
+               }
 
                $menuFrameName = 'menu';
                if($GLOBALS['BE_USER']->uc['noMenuMode'] === 'icons') {
index 7935a3f..a1029d5 100644 (file)
@@ -141,8 +141,9 @@ function loadEditId(id,addGetVars)  {       //
        if (top.content && top.content.nav_frame && top.content.nav_frame.refresh_nav)  {
                top.content.nav_frame.refresh_nav();
        }
-
-       top.goToModule(TYPO3.configuration.pageModule, 0, addGetVars?addGetVars:"");
+       if (TYPO3.configuration.pageModule) {
+               top.goToModule(TYPO3.configuration.pageModule, 0, addGetVars?addGetVars:"");
+       }
 }
 
 /**
index 1d49049..b22fa05 100644 (file)
@@ -168,7 +168,9 @@ var WorkspaceMenu = Class.create({
                                                // the boolean "true" makes the page reload from the server
                                        $('content').contentWindow.location.reload(true);
                                } else {
-                                       top.goToModule('web_layout');
+                                       if (TYPO3.configuration.pageModule) {
+                                               top.goToModule(TYPO3.configuration.pageModule);
+                                       }
                                }
 
                                        // reload the module menu