[BUGFIX] Make extension update work again 30/28730/2
authorHelmut Hummel <helmut.hummel@typo3.org>
Mon, 24 Mar 2014 23:42:15 +0000 (00:42 +0100)
committerHelmut Hummel <helmut.hummel@typo3.org>
Mon, 24 Mar 2014 23:50:43 +0000 (00:50 +0100)
This is a regression fix. The regression was
introduced when fixing the dependency handling.

Resolves: #57260
Related: #57199
Releases: 6.2
Change-Id: I77bff766d0e4bd9d3ce74fa74db03d6b65223e67
Reviewed-on: https://review.typo3.org/28730
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
typo3/sysext/extensionmanager/Classes/Service/ExtensionManagementService.php

index eb40df3..4d41b0e 100644 (file)
@@ -70,12 +70,6 @@ class ExtensionManagementService implements \TYPO3\CMS\Core\SingletonInterface {
        protected $downloadUtility;
 
        /**
-        * @var \TYPO3\CMS\Core\Package\PackageManager
-        * @inject
-        */
-       protected $packageManager;
-
-       /**
         * @param string $extensionKey
         * @return void
         */
@@ -274,7 +268,9 @@ class ExtensionManagementService implements \TYPO3\CMS\Core\SingletonInterface {
         * @return void
         */
        public function downloadMainExtension(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension $extension) {
-               if (!$this->packageManager->isPackageAvailable($extension->getExtensionKey())) {
+               // The extension object has a uid if the extension is not present in the system
+               // or an update of a present extension is triggered.
+               if ($extension->getUid()) {
                        $this->downloadUtility->download($extension);
                }
        }