Project

General

Profile

Bug #11804 ยป 11804-migrateworkspaces.patch

Tolleiv Nietsch, 2011-01-15 19:34

View differences:

typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php (working copy)
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_stages', $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;
$reason .= ' The existing workspaces need to be checked for compatibility with the new features.';
}
if (!$result) {
$this->includeTCA();
$result = $this->isDraftWorkspaceUsed();
$reason .= ' The old style draft workspace is used.
Related records will be moved into a full featured workspace.';
}
$description .= '<strong>Why do you need this wizard?</strong><br />' . $reason;
}
return $result;
    (1-1/1)