Project

General

Profile

Bug #24752 » 0017244_core.patch

Administrator Admin, 2011-02-17 12:36

View differences:

tests/t3lib/t3lib_extmgmTest.php (Arbeitskopie)
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']),
);
......
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));
}
}
?>
t3lib/config_default.php (Arbeitskopie)
//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!
......
'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, // <p>Integer (0, 1, 2, 3)</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><dt>2</dt><dd>scripts cached and prefix includes a hash based on the 'extList' string</dd><dt>3</dt><dd>scripts cached to typo3conf/temp_CACHED_* (no hash included at all...)</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', // String (exclude) List of extensions which are enabled for this install. Use the Extension Manager (EM) to manage this!
t3lib/class.t3lib_extmgm.php (Arbeitskopie)
$extLoadInContext = $GLOBALS['TYPO3_CONF_VARS']['EXT']['extList'];
}
$extensionList = $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt'] . ',' . $extLoadInContext;
$extensionList = self::getRequiredExtensionList() . ',' . $extLoadInContext;
$ignoredExtensionList = self::getIgnoredExtensionList();
// Remove the extensions to be ignored:
if ($ignoredExtensionList && (defined('TYPO3_enterInstallScript') && TYPO3_enterInstallScript) === FALSE) {
$extensions = array_diff(
explode(',', $extensionList),
explode(',', $ignoredExtensionList)
);
$extensionList = implode(',', $extensions);
}
return $extensionList;
}
/**
* Gets the list of required extensions.
*
* @return string
*/
public static function getRequiredExtensionList() {
$requiredExtensionList = t3lib_div::uniqueList(
REQUIRED_EXTENSIONS . ',' . $GLOBALS['TYPO3_CONF_VARS']['EXT']['requiredExt']
);
return $requiredExtensionList;
}
/**
* Gets the list of extensions to be ignored (not to be loaded).
*
* @return string
*/
public static function getIgnoredExtensionList() {
$ignoredExtensionList = t3lib_div::uniqueList(
$GLOBALS['TYPO3_CONF_VARS']['EXT']['ignoredExt']
);
return $ignoredExtensionList;
}
}
?>
(2-2/2)