[BUGFIX] Upgrade Wizards appear over and over again
authorSteffen Gebert <steffen.gebert@typo3.org>
Mon, 24 Oct 2011 22:18:02 +0000 (00:18 +0200)
committerJigal van Hemert <jigal@xs4all.nl>
Tue, 25 Oct 2011 06:45:12 +0000 (08:45 +0200)
The Upgrade Wizards "Check Compression Level" and
"Deprecated RTE properties" appear over and over again,
instead of hiding themselves after one execution.

Change-Id: I4d90abc7c88308b2f75dcc20ae4db52d0d383a10
Fixes: #31248
Releases: 4.6
Reviewed-on: http://review.typo3.org/6273
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
Reviewed-by: Philipp Gampe
Tested-by: Philipp Gampe
Reviewed-by: Jigal van Hemert
Tested-by: Jigal van Hemert
typo3/sysext/install/updates/class.tx_coreupdates_compressionlevel.php
typo3/sysext/rtehtmlarea/hooks/install/class.tx_rtehtmlarea_deprecatedrteproperties.php

index 981fc9e..470ff2c 100644 (file)
@@ -43,7 +43,8 @@ class tx_coreupdates_compressionlevel extends Tx_Install_Updates_Base {
                $description = '<p><strong>TYPO3_CONF_VARS[BE][compressionLevel] is enabled.</strong><br />
                In TYPO3 4.4, compressionLevel was expanded to include automatic gzip compression of JavaScript and CSS stylessheet files.
                <strong>To prevent the TYPO3 backend from being unusable, you must include the relevant lines from _.htaccess.</strong></p>';
-               if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']) > 0) {
+
+               if (!$this->isWizardDone() && intval($GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel']) > 0) {
                        return TRUE;
                }
                return FALSE;
@@ -80,6 +81,7 @@ AddEncoding gzip .gzip
         */
        public function performUpdate(array &$dbQueries, &$customMessages) {
                $customMessages = 'Cannot automatically fix this problem! Please check manually.';
+               $this->markWizardAsDone();
                return FALSE;
        }
 }
index d809608..613e21f 100644 (file)
@@ -132,11 +132,18 @@ class tx_rtehtmlarea_deprecatedRteProperties extends Tx_Install_Updates_Base {
                                                '<table><thead><tr><th>Deprecated property</th></tr></thead><tbody>' . $replacementProperties . '</tboby></table>' . LF .
                                                '<p>Therefore, the Page TSconfig column of those pages will need to be updated manually.</p>' . LF;
                                }
+                               $result = TRUE;
+                       } else {
+                                       // if we found no occurence of deprecated settings and wizard was already executed, then
+                                       // we do not show up anymore
+                               if ($this->isWizardDone()) {
+                                       $result = FALSE;
+                               }
                        }
                        $description .= '<p>Only page records were searched for deprecated properties. However, such properties can also be used in BE group and BE user records (prepended with page.). These are not searched nor updated by this wizard.</p>' . LF .
                                '<p>Page TSconfig may also be included from external files. These are not updated by this wizard. If required, the update will need to be done manually.</p>' . LF .
                                '<p>Note also that deprecated properties have been replaced in default configurations provided by htmlArea RTE';
-                       $result = TRUE;
+
                }
                return $result;
        }
@@ -167,6 +174,7 @@ class tx_rtehtmlarea_deprecatedRteProperties extends Tx_Install_Updates_Base {
                        $customMessages .= '<p>Only page records were searched for deprecated properties. However, such properties can also be used in BE group and BE user records (prepended with page.). These are not searched nor updated by this wizard.</p>' . LF .
                                '<p>Page TSconfig may also be included from external files. These were not updated by this wizard. If required, the update will need to be done manually.</p>';
                }
+               $this->markWizardAsDone();
                return empty($customMessages) || $success;
        }