[BUGFIX] Disable extension updates in Composer mode 21/58921/4
authorNicole Cordes <typo3@cordes.co>
Tue, 20 Nov 2018 22:17:15 +0000 (23:17 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Mon, 3 Dec 2018 20:32:16 +0000 (21:32 +0100)
Resolves: #86958
Releases: master, 8.7
Change-Id: Ib0f51088d42ab3dba014efcbd4c702447d75f984
Reviewed-on: https://review.typo3.org/58921
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Wolfgang Klinger <wolfgang@wazum.com>
Reviewed-by: Jörg Bösche <typo3@joergboesche.de>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/extensionmanager/Classes/Controller/ListController.php
typo3/sysext/extensionmanager/Resources/Private/Templates/List/Index.html

index 3347c97..2f0f7fb 100644 (file)
@@ -141,7 +141,12 @@ class ListController extends AbstractModuleController
         $this->addComposerModeNotification();
         $availableAndInstalledExtensions = $this->listUtility->getAvailableAndInstalledExtensionsWithAdditionalInformation();
         ksort($availableAndInstalledExtensions);
-        $this->view->assign('extensions', $availableAndInstalledExtensions);
+        $this->view->assignMultiple(
+            [
+                'extensions' => $availableAndInstalledExtensions,
+                'isComposerMode' => Environment::isComposerMode(),
+            ]
+        );
         $this->handleTriggerArguments();
     }
 
index 088caf4..ff1b2be 100644 (file)
@@ -40,7 +40,7 @@
                                </f:if>
                                <td>
                                        <f:if condition="{extension.updateAvailable}">
-                                               <f:if condition="{extension.state} == 'excludeFromUpdates'">
+                                               <f:if condition="{isComposerMode} || {settings.offlineMode} || {extension.state} == 'excludeFromUpdates'">
                                                        <f:then>
                                                                <span class="btn btn-default disabled" title="{f:translate(key:'extensionList.updateDisabled')}">
                                                                        <core:icon identifier="actions-system-extension-update" />