[BUGFIX] Split check for adding adminPanelHeaderData
[Packages/TYPO3.CMS.git] / typo3 / sysext / frontend / Classes / Http / RequestHandler.php
index 9ecf498..ced52d9 100644 (file)
@@ -265,13 +265,13 @@ class RequestHandler implements RequestHandlerInterface {
                echo $this->controller->beLoginLinkIPList();
 
                // Admin panel
-               if (
-                       $this->controller->isBackendUserLoggedIn()
-                       && $GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication
-                       && $GLOBALS['BE_USER']->isAdminPanelVisible()
-               ) {
-                       $this->controller->content = str_ireplace('</head>', $GLOBALS['BE_USER']->adminPanel->getAdminPanelHeaderData() . '</head>', $this->controller->content);
-                       $this->controller->content = str_ireplace('</body>', $GLOBALS['BE_USER']->displayAdminPanel() . '</body>', $this->controller->content);
+               if ($this->controller->isBackendUserLoggedIn() && $GLOBALS['BE_USER'] instanceof FrontendBackendUserAuthentication) {
+                       if ($GLOBALS['BE_USER']->extAdmEnabled) {
+                               $this->controller->content = str_ireplace('</head>', $GLOBALS['BE_USER']->adminPanel->getAdminPanelHeaderData() . '</head>', $this->controller->content);
+                       }
+                       if ($GLOBALS['BE_USER']->isAdminPanelVisible()) {
+                               $this->controller->content = str_ireplace('</body>', $GLOBALS['BE_USER']->displayAdminPanel() . '</body>', $this->controller->content);
+                       }
                }
 
                if ($sendTSFEContent) {