Index: tests/t3lib/t3lib_extmgmTest.php =================================================================== --- tests/t3lib/t3lib_extmgmTest.php (Revision 10478) +++ tests/t3lib/t3lib_extmgmTest.php (Arbeitskopie) @@ -41,6 +41,7 @@ public function setUp() { $this->globals = array( + 'TYPO3_CONF_VARS' => serialize($GLOBALS['TYPO3_CONF_VARS']), 'TYPO3_LOADED_EXT' => serialize($GLOBALS['TYPO3_LOADED_EXT']), 'TCA' => serialize($GLOBALS['TCA']), ); @@ -472,5 +473,30 @@ t3lib_extMgm::getExtensionVersion($extensionKey) ); } + + /** + * @test + */ + public function getEnabledExtensionListConsidersRequiredExtensions() { + $testrequiRedExtension = uniqid('test'); + $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = $testrequiRedExtension; + + $extensions = explode(',', t3lib_extMgm::getEnabledExtensionList()); + $this->assertTrue(in_array($testrequiRedExtension, $extensions)); + } + + /** + * @test + */ + public function getEnabledExtensionListConsidersRequiredAndIgnoredExtensions() { + $testRequiredExtension = uniqid('test'); + $testIgnoredExtension = uniqid('test'); + $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] = $testRequiredExtension . ',' . $testIgnoredExtension; + $GLOBALS['TYPO3_CONF_VARS']['EXT']['ignoredExt'] = $testIgnoredExtension; + + $extensions = explode(',', t3lib_extMgm::getEnabledExtensionList()); + $this->assertTrue(in_array($testRequiredExtension, $extensions)); + $this->assertFalse(in_array($testIgnoredExtension, $extensions)); + } } ?> \ No newline at end of file Index: t3lib/config_default.php =================================================================== --- t3lib/config_default.php (Revision 10478) +++ t3lib/config_default.php (Arbeitskopie) @@ -22,6 +22,9 @@ //Security related constant: Comma separated list of file extensions that should be registered as php script file extensions define('PHP_EXTENSIONS_DEFAULT', 'php,php3,php4,php5,php6,phpsh,inc,phtml'); +// Defines a list that are basically required by a TYPO3 system. +define('REQUIRED_EXTENSIONS', 'cms,lang,sv,em,recordlist'); + $TYPO3_CONF_VARS = array( 'GFX' => array( // Configuration of the image processing features in TYPO3. 'IM' and 'GD' are short for ImageMagick and GD library respectively. 'image_processing' => TRUE, // Boolean: Enables image processing features. Disabling this means NO image processing with either GD or IM! @@ -171,7 +174,8 @@ 'em_wsdlURL' => 'http://typo3.org/wsdl/tx_ter_wsdl.php', // The SOAP URL for uploading extensions to the TER2. Usually doesn't need to be changed. 'em_mirrorListURL' => 'http://repositories.typo3.org/mirrors.xml.gz', // Allows to preset the URL for fetching the extension repository mirror list from. Used in the Extension Manager. - 'requiredExt' => 'cms,lang,sv,em,recordlist', // String (exclude). List of extensions which are REQUIRED and cannot be unloaded by the Extension Manager! + 'requiredExt' => '', // String. List of additional extensions which are REQUIRED and cannot be unloaded by the Extension Manager! + 'ignoredExt' => '', // String. List of extensions to be ignored (not loaded), e.g. "em" can be disabled this way. '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, //
Integer (0, 1, 2, 3)