[TASK] Hide "upload extension" button in composer mode 26/44626/4
authorDaniel Goerz <ervaude@gmail.com>
Mon, 9 Nov 2015 09:43:41 +0000 (10:43 +0100)
committerMarkus Klein <markus.klein@typo3.org>
Mon, 9 Nov 2015 19:31:22 +0000 (20:31 +0100)
Resolves: #71432
Releases: master
Change-Id: I404df460fdb6ef82d351786b470a09c24105244a
Reviewed-on: https://review.typo3.org/44626
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/extensionmanager/Classes/Controller/AbstractModuleController.php
typo3/sysext/extensionmanager/Classes/Controller/ListController.php

index 50a0194..b33f434 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Extensionmanager\Controller;
  * The TYPO3 project - inspiring people to share!
  */
 use TYPO3\CMS\Backend\View\BackendTemplateView;
+use TYPO3\CMS\Core\Core\Bootstrap;
 use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
 
 /**
@@ -67,7 +68,7 @@ class AbstractModuleController extends AbstractController {
             ]
         ];
 
-        if (!$this->settings['offlineMode'] && !$this->settings['composerMode']) {
+        if (!$this->settings['offlineMode'] && !Bootstrap::usesComposerClassLoading()) {
             $menuItems['getExtensions'] = [
                 'controller' => 'List',
                 'action' => 'ter',
index 267ef34..1f27828 100644 (file)
@@ -105,9 +105,6 @@ class ListController extends AbstractModuleController
         if ($this->configurationUtility->getCurrentConfiguration('extensionmanager')['offlineMode']['value']) {
             $this->settings['offlineMode'] = true;
         }
-        if (Bootstrap::usesComposerClassLoading()) {
-            $this->settings['composerMode'] = true;
-        }
     }
 
     /**
@@ -273,12 +270,15 @@ class ListController extends AbstractModuleController
     /**
      * Registers the Icons into the docheader
      *
-     * @return void
      * @throws \InvalidArgumentException
      */
     protected function registerDocheaderButtons()
     {
-        if ($this->actionMethodName === 'distributionsAction') {
+        if (Bootstrap::usesComposerClassLoading()) {
+            return;
+        }
+
+        if (!in_array($this->actionMethodName, ['indexAction', 'terAction', 'showAllVersionsAction'], true)) {
             return;
         }