[BUGFIX] Split check for adding adminPanelHeaderData 22/40922/5
authorDavid Greiner <hallo@davidgreiner.de>
Sun, 5 Jul 2015 16:12:13 +0000 (18:12 +0200)
committerAndreas Wolf <andreas.wolf@typo3.org>
Fri, 17 Jul 2015 09:11:02 +0000 (11:11 +0200)
The check is split into "is the panel enabled" and "should it be
visible", as additional adminPanelHeaderData should also be rendered
if the admin panel is enabled but not visible.

Resolves: #61298
Releases: master
Change-Id: Ic94d74d0216964fbb4ba097a375ff11202136d13
Reviewed-on: http://review.typo3.org/40922
Reviewed-by: Andreas Wolf <andreas.wolf@typo3.org>
Tested-by: Andreas Wolf <andreas.wolf@typo3.org>
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) {