[BUGFIX] Check registry for upgrade wizard report 49/56049/2
authorJigal van Hemert <jigal.van.hemert@typo3.org>
Thu, 8 Mar 2018 07:29:31 +0000 (08:29 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 8 Mar 2018 23:43:18 +0000 (00:43 +0100)
In the Reports module the check for unfinished upgrade wizards also
checks the registry to see if a wizard is marked as done. Upgrade
wizards can be marked as done even if their function
shouldRenderWizard() indicates that they are not finished. The
Reports module now shows the same status as the Install Tool.

Resolves: #84146
Releases: 8.7
Change-Id: I994f362545437743216cfc9a64fbf0d6af394379
Reviewed-on: https://review.typo3.org/56049
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/install/Classes/Report/InstallStatusReport.php

index d2dbd52..62bb699 100644 (file)
@@ -15,6 +15,7 @@ namespace TYPO3\CMS\Install\Report;
  */
 
 use TYPO3\CMS\Backend\Utility\BackendUtility;
+use TYPO3\CMS\Core\Registry;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
 use TYPO3\CMS\Install\Service\Exception;
 use TYPO3\CMS\Lang\LanguageService;
@@ -59,7 +60,7 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
         // Requirement level
         // -1 = not required, but if it exists may be writable or not
         //  0 = not required, if it exists the dir should be writable
-        //  1 = required, don't has to be writable
+        //  1 = required, doesn't have to be writable
         //  2 = required, has to be writable
         $checkWritable = [
             'typo3temp/' => 2,
@@ -149,9 +150,11 @@ class InstallStatusReport implements \TYPO3\CMS\Reports\StatusProviderInterface
         // check if there are update wizards left to perform
         if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'])) {
             $versionAsInt = \TYPO3\CMS\Core\Utility\VersionNumberUtility::convertVersionNumberToInteger(TYPO3_version);
+            $registry = GeneralUtility::makeInstance(Registry::class);
             foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['ext/install']['update'] as $identifier => $className) {
                 $updateObject = GeneralUtility::makeInstance($className, $identifier, $versionAsInt, null, $this);
-                if ($updateObject->shouldRenderWizard()) {
+                $markedDoneInRegistry = $registry->get('installUpdate', $className, false);
+                if (!$markedDoneInRegistry && $updateObject->shouldRenderWizard()) {
                     // at least one wizard was found
                     $value = $languageService->getLL('status_updateIncomplete');
                     $severity = Status::WARNING;