[BUGFIX] Fix automatic core updater 93/28393/9
authorMarkus Klein <klein.t3@mfc-linz.at>
Tue, 18 Mar 2014 22:39:24 +0000 (23:39 +0100)
committerMarkus Klein <klein.t3@mfc-linz.at>
Tue, 18 Mar 2014 23:22:44 +0000 (00:22 +0100)
AbstractCoreUpdate redefines the $view member to be
a JsonView, but does not re-implement the parent methods
that rely on $view being an AbstractView.

Fix this by re-implementing the initializeHandle() method.
This method can be merged with the former initializeCoreUpdate(),
which wasn't called at all in most actions.

Resolves: #56865
Releases: 6.2
Change-Id: I85260a0e57e915ac941569cfbdde1f96cdaec5e6
Reviewed-on: https://review.typo3.org/28393
Reviewed-by: Philipp Gampe
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Markus Klein
Tested-by: Markus Klein
typo3/sysext/install/Classes/Controller/Action/AbstractAction.php
typo3/sysext/install/Classes/Controller/Action/Ajax/AbstractCoreUpdate.php
typo3/sysext/install/Classes/Controller/Action/Ajax/CoreUpdateIsUpdateAvailable.php

index 7f9fdb5..01f7032 100644 (file)
@@ -102,7 +102,7 @@ abstract class AbstractAction implements ActionInterface {
        /**
         * Initialize the handle action, sets up fluid stuff and assigns default variables.
         *
-        * @return string content
+        * @return void
         */
        protected function initializeHandle() {
                /** @var \TYPO3\CMS\Install\Status\StatusUtility $statusUtility */
index 60d456e..84886ce 100644 (file)
@@ -55,12 +55,12 @@ abstract class AbstractCoreUpdate extends AbstractAjaxAction {
        protected $coreVersionService;
 
        /**
-        * Common stuff to be done before performing update tasks
+        * Initialize the handle action, sets up fluid stuff and assigns default variables.
         *
         * @return void
         * @throws \TYPO3\CMS\Install\Controller\Exception
         */
-       protected function initializeCoreUpdate() {
+       protected function initializeHandle() {
                if (!$this->coreUpdateService->isCoreUpdateEnabled()) {
                        throw new \TYPO3\CMS\Install\Controller\Exception(
                                'Core Update disabled in this environment',
index 95dbf37..f3aa721 100644 (file)
@@ -35,8 +35,6 @@ class CoreUpdateIsUpdateAvailable extends AbstractCoreUpdate {
         * @return array Rendered content
         */
        protected function executeAction() {
-               $this->initializeCoreUpdate();
-
                $status = array();
                if ($this->coreVersionService->isInstalledVersionAReleasedVersion()) {
                        $isDevelopmentUpdateAvailable = $this->coreVersionService->isYoungerPatchDevelopmentReleaseAvailable();