extList was kept next to the new extListArray in LocalConfiguration.
Both hold the current list of loaded extensions. This leads to
confusion which variable is the one that takes precedence.
The patch removes extList from the upgrade wizard in the install tool
and only writes extListArray. This way, only one key is kept in
LocalConfiguration.php. For compatibility reasons, the array entry
'extList' is added to $GLOBALS['TYPO3_CONF_VARS'] at runtime during
bootstrap.
Change-Id: I6102b2b4da9761c86189ae3f73ad3a423715e037
Resolves: #43094
Releases: 6.0
Reviewed-on: http://review.typo3.org/16566
Reviewed-by: Helmut Hummel
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
Reviewed-by: Wouter Wolters
'requiredExt' => array(), // String. List of additional extensions which are REQUIRED and cannot be unloaded by the Extension Manager!
'excludeForPackaging' => '(CVS|\\..*|.*~|.*\\.bak)', // String: List of directories and files which will not be packaged into extensions nor taken into account otherwise by the Extension Manager. Perl regular expression syntax!
'extCache' => -1, // <p>Integer (0, 1)</p><dl><dt>0</dt><dd>ext-scripts (ext_localconf.php and ext_tables.php) are NOT cached, but included every time</dd><dt>1</dt><dd>scripts cached to typo3conf/temp_CACHED_[sitePathHash]* (saves some milliseconds even with PHP accelerators)</dd></dl>
- 'extList' => 'filelist,version,tsconfig_help,context_help,extra_page_cm_options,impexp,belog,about,cshmanual,aboutmodules,setup,opendocs,install,t3editor,felogin,feedit,recycler',
'extListArray' => array(
'filelist',
'version',
* Path to default TYPO3_CONF_VARS file, relative to PATH_site
*/
const DEFAULT_CONFIGURATION_FILE = 't3lib/stddb/DefaultConfiguration.php';
+
/**
* Path to local overload TYPO3_CONF_VARS file, relative to PATH_site
*/
const LOCAL_CONFIGURATION_FILE = 'typo3conf/LocalConfiguration.php';
+
/**
* Path to additional local file, relative to PATH_site
*/
const ADDITIONAL_CONFIGURATION_FILE = 'typo3conf/AdditionalConfiguration.php';
+
/**
* Path to legacy localconf.php file, relative to PATH_site
*/
const LOCALCONF_FILE = 'typo3conf/localconf.php';
+
/**
* Writing to these configuration pathes is always allowed,
* even if the requested sub path does not exist yet.
if (@is_file((PATH_site . self::ADDITIONAL_CONFIGURATION_FILE))) {
require PATH_site . self::ADDITIONAL_CONFIGURATION_FILE;
}
+ // @deprecated since 6.0: Simulate old 'extList' as comma separated list of 'extListArray'
+ $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = implode(',', $GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray']);
} elseif (@is_file((PATH_site . self::LOCALCONF_FILE))) {
$GLOBALS['TYPO3_CONF_VARS'] = $this->getDefaultConfiguration();
// Legacy localconf.php handling
$loadedExtensions = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray'];
} else {
// Fallback handling if extlist is still a string and not an array
+ // @deprecated since 6.0, will be removed in 6.2
$loadedExtensions = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList']);
}
// Add required extensions
static public function writeNewExtensionList(array $newExtensionList) {
$extensionList = array_unique($newExtensionList);
\TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->setLocalConfigurationValueByPath('EXT/extListArray', $extensionList);
- // @deprecated: extList as string is deprecated, the handling will be removed with 6.2
- // For now, this value is still set for better backwards compatibility
- \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Configuration\\ConfigurationManager')->setLocalConfigurationValueByPath('EXT/extList', implode(',', $extensionList));
static::removeCacheFiles();
}
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::removeCacheFiles();
// Set new extlist / extlistArray for extension load changes at runtime
$localConfiguration = $this->configurationManager->getLocalConfiguration();
- $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = $localConfiguration['EXT']['extList'];
$GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray'] = $localConfiguration['EXT']['extListArray'];
+ $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'] = implode(',', $GLOBALS['TYPO3_CONF_VARS']['EXT']['extListArray']);
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->populateTypo3LoadedExtGlobal(FALSE)->loadAdditionalConfigurationFromExtensions(FALSE);
}
if (preg_match('/^\\$TYPO3_CONF_VARS\\[\'EXT\'\\]\\[\'extList\'\\] *={1} *\'(.+)\';{1}/', $line, $matches) === 1) {
$extListAsArray = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(',', $matches[1], TRUE);
$typo3ConfigurationVariables[] = '$TYPO3_CONF_VARS[\'EXT\'][\'extListArray\'] = ' . var_export($extListAsArray, TRUE) . ';';
- $typo3ConfigurationVariables[] = '$TYPO3_CONF_VARS[\'EXT\'][\'extList\'] = \'' . $matches[1] . '\';';
} elseif (preg_match('/^\\$TYPO3_CONF_VARS.+;{1}/', $line, $matches) === 1) {
$typo3ConfigurationVariables[] = $matches[0];
} elseif (preg_match('/^\\$typo_db.+;{1}/', $line, $matches) === 1) {