[BUGFIX] Disable dump autoloading in Composer mode 78/58578/4
authorRune Piper <kontakt@runepiper.de>
Fri, 5 Oct 2018 07:20:00 +0000 (09:20 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Thu, 11 Oct 2018 12:11:27 +0000 (14:11 +0200)
This patch hides the "Dump autoload" button in the maintenance area when
in Composer mode, because it does nothing.

Resolves: #86565
Releases: master
Change-Id: Ib8f71f5a41189f97f02aed6b4c7cb69feabef724
Reviewed-on: https://review.typo3.org/58578
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Torben Hansen <derhansen@gmail.com>
Reviewed-by: Nikita Hovratov <nikita.h@live.de>
Tested-by: Nikita Hovratov <nikita.h@live.de>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Tobi Kretschmann <tobi@tobishome.de>
Tested-by: Tobi Kretschmann <tobi@tobishome.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/install/Classes/Controller/AbstractController.php
typo3/sysext/install/Resources/Private/Templates/Maintenance/Cards.html

index 43d1f3d..33b9e9a 100644 (file)
@@ -16,6 +16,7 @@ namespace TYPO3\CMS\Install\Controller;
  */
 
 use Psr\Http\Message\ServerRequestInterface;
+use TYPO3\CMS\Core\Core\Environment;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Fluid\View\StandaloneView;
 
@@ -44,6 +45,7 @@ class AbstractController
         $view->assignMultiple([
             'controller' => $request->getQueryParams()['install']['controller'] ?? 'maintenance',
             'context' => $request->getQueryParams()['install']['context'] ?? '',
+            'composerMode' => Environment::isComposerMode(),
         ]);
         return $view;
     }
index 4355d15..c72f4c9 100644 (file)
                <div class="card-content">
                        <p class="card-text">Resets autoload information for all active third party extensions.</p>
                </div>
-               <div class="card-footer">
-                       <a href="#" class="btn btn-primary " data-inline="1"  data-require="TYPO3/CMS/Install/DumpAutoload">Dump autoload</a>
-               </div>
+               <f:if condition="{composerMode}">
+                       <f:then>
+                               <div class="card-footer text-muted">Reset autoloading via Composer</div>
+                       </f:then>
+                       <f:else>
+                               <div class="card-footer">
+                                       <a href="#" class="btn btn-primary " data-inline="1"  data-require="TYPO3/CMS/Install/DumpAutoload">Dump autoload</a>
+                               </div>
+                       </f:else>
+               </f:if>
        </div>
        <div class="card card-size-fixed-small">
                <f:render partial="Card/Header" arguments="{ title: 'Clear Persistent Database Tables', subtitle: 'Database', icon: 'Icons/modules/install-clear-database.svg'}" />