[BUGFIX] Prevent extension download if disabled 13/38613/2
authorNicole Cordes <typo3@cordes.co>
Tue, 24 Mar 2015 09:59:18 +0000 (10:59 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Fri, 10 Apr 2015 09:10:02 +0000 (11:10 +0200)
If you disable extension installation in Install Tool (disable all
[EXT][allow*Install] options) a weird error is thrown if you try to
install an extension anyway. This patch hides the "Import and Install"
button of no install path is available.

Resolves: #58800
Releases: master, 6.2
Change-Id: I057e7e4d6a8360638c60427b3855142ab7df2147
Reviewed-on: http://review.typo3.org/38613
Reviewed-by: Helmut Hummel <helmut.hummel@typo3.org>
Tested-by: Helmut Hummel <helmut.hummel@typo3.org>
typo3/sysext/extensionmanager/Classes/ViewHelpers/DownloadExtensionViewHelper.php

index 9e74b37..a8be2fc 100644 (file)
@@ -33,6 +33,9 @@ class DownloadExtensionViewHelper extends \TYPO3\CMS\Fluid\ViewHelpers\FormViewH
         */
        public function render(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension) {
                $installPaths = \TYPO3\CMS\Extensionmanager\Domain\Model\Extension::returnAllowedInstallPaths();
+               if (empty($installPaths)) {
+                       return '';
+               }
                $pathSelector = '<ul class="is-hidden">';
                foreach ($installPaths as $installPathType => $installPath) {
                        $pathSelector .= '<li>