[BUGFIX] Reload extension list after update
[Packages/TYPO3.CMS.git] / typo3 / sysext / extensionmanager / Classes / Controller / DownloadController.php
index 116a4b7..eb1fda9 100644 (file)
@@ -176,23 +176,22 @@ class DownloadController extends AbstractController {
         * already. This method should only be called if we are sure that there is
         * an update.
         *
-        * @return void
+        * @return string
         */
        protected function updateExtensionAction() {
-               $hasErrors = FALSE;
-               $errorMessage = '';
-
                $extensionKey = $this->request->getArgument('extension');
                $highestTerVersionExtension = $this->extensionRepository->findHighestAvailableVersion($extensionKey);
                try {
                        $this->managementService->downloadMainExtension($highestTerVersionExtension);
+                       $this->addFlashMessage(
+                               htmlspecialchars($this->translate('extensionList.updateFlashMessage.body', array($extensionKey))),
+                               $this->translate('extensionList.updateFlashMessage.title')
+                       );
                } catch (\Exception $e) {
-                       $hasErrors = TRUE;
-                       $errorMessage = $e->getMessage();
+                       $this->addFlashMessage(htmlspecialchars($e->getMessage()), '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR);
                }
-               $this->view->assign('extension', $highestTerVersionExtension)
-                       ->assign('hasErrors', $hasErrors)
-                       ->assign('errorMessage', $errorMessage);
+
+               return '';
        }
 
        /**