Fixed bug #17102: migrateWorkspaces in Install-Tool doesn't show up in all relevant...
authorFrancois Suter <francois.suter@typo3.org>
Thu, 20 Jan 2011 14:39:04 +0000 (14:39 +0000)
committerFrancois Suter <francois.suter@typo3.org>
Thu, 20 Jan 2011 14:39:04 +0000 (14:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@10160 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php

index 3b8208f..8366141 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
        * Fixed bug #17114: Install Tool does not install extensions properly
        * Fixed bug #16926: Database is not updated during workspace-migration wizard
+       * Fixed bug #17102: migrateWorkspaces in Install-Tool doesn't show up in all relevant situations (Thanks to Tolleiv Nietsch)
 
 2011-01-20  Susanne Moog  <typo3@susanne-moog.de>
 
index 1d0fe4a..33b1089 100644 (file)
@@ -50,19 +50,36 @@ class tx_coreupdates_migrateworkspaces extends tx_coreupdates_installsysexts {
                migrates the old-style workspaces with fixed workflow to a custom-stage workflow. If required
                the extbase, fluid, version and workspaces extensions are installed.';
 
+               $reason = '';
                        // TYPO3 version 4.5 and above
                if ($this->versionNumber >= 4005000) {
+
+                       if(!t3lib_extMgm::isLoaded('version') || !t3lib_extMgm::isLoaded('workspaces')) {
+                               $result = TRUE;
+                               $reason .= ' The extensions "version" and "workspaces" need to be
+                                       present to use the entire versioning and workflow featureset of TYPO3.';
+                       }
+
                        $tables = array_keys($GLOBALS['TYPO3_DB']->admin_get_tables());
                                // sys_workspace table might not exists if version extension was never installed
-                       if (in_array('sys_workspace', $tables)) {
+                       if (!in_array('sys_workspace', $tables) || !in_array('sys_workspace_stage', $tables)) {
+                               $result = TRUE;
+                               $reason .= ' The database tables for the workspace functionality are missing.';
+                       } else {
                                $wsCount = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'sys_workspace', '');
-                               $result = $wsCount > 0;
+                               $result |= $wsCount > 0;
+                               $reason .= ' The existing workspaces will be checked for compatibility with the new features.';
                        }
 
-                       if (!$result) {
-                               $this->includeTCA();
-                               $result = $this->isDraftWorkspaceUsed();
+                       $this->includeTCA();
+                       $draftWorkspaceTestResult = $this->isDraftWorkspaceUsed();
+                       if ($draftWorkspaceTestResult) {
+                               $reason .= ' The old style draft workspace is used.
+                                       Related records will be moved into a full featured workspace.';
+                               $result = TRUE;
                        }
+
+                       $description .= '<br /><strong>Why do you need this wizard?</strong><br />' . $reason;
                }
 
                return $result;