Bug #24388 » 16926.patch
typo3/sysext/install/updates/class.tx_coreupdates_migrateworkspaces.php (working copy) | ||
---|---|---|
$extList = $this->addExtToList($extensionKeys);
|
||
if ($extList) {
|
||
$this->writeNewExtensionList($extList);
|
||
$this->runNewExtensionDbUpdates($extensionKeys);
|
||
$result = TRUE;
|
||
}
|
||
return $result;
|
||
}
|
||
/**
|
||
* Performing all relevant database updates for the newly installed system extensions
|
||
*
|
||
* @param array $extensionKeys
|
||
* @return void
|
||
*/
|
||
protected function runNewExtensionDbUpdates($extensionKeys) {
|
||
$install = t3lib_div::makeInstance('t3lib_install');
|
||
foreach ($extensionKeys as $extension) {
|
||
$filename = t3lib_extMgm::extPath($extension, 'ext_tables.sql');
|
||
if (!is_readable($filename)) {
|
||
continue;
|
||
}
|
||
$fileContent = t3lib_div::getUrl($filename);
|
||
$FDfile = $install->getFieldDefinitions_fileContent($fileContent);
|
||
if (count($FDfile)) {
|
||
$FDdb = $install->getFieldDefinitions_database(TYPO3_db);
|
||
$diff = $install->getDatabaseExtra($FDfile, $FDdb);
|
||
$updates = $install->getUpdateSuggestions($diff);
|
||
foreach ($updates as $key => $update_block) {
|
||
// make sure only certain blocks are processed
|
||
// we don't want to delete anything here!
|
||
if (!in_array($key, array('add', 'change', 'create_table'))) {
|
||
continue;
|
||
}
|
||
foreach ($update_block as $update) {
|
||
$this->sqlQueries[] = $update;
|
||
$GLOBALS['TYPO3_DB']->admin_query($update);
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
/**
|
||
* Check if any table contains draft-workspace records
|
||
*
|
||
* @return bool
|