Project

General

Profile

Bug #17506 » 6103.diff

Administrator Admin, 2007-08-22 08:31

View differences:

typo3/mod/tools/em/class.em_index.php (copie de travail)
$extList = t3lib_div::get_dirs($path);
if (is_array($extList)) {
foreach($extList as $extKey) {
if (@is_file($path.$extKey.'/ext_emconf.php')) {
$emConf = $this->includeEMCONF($path.$extKey.'/ext_emconf.php', $extKey);
$filename = $path.$extKey.'/ext_emconf.php';
if (@is_file($filename)) {
$emConf = $this->includeEMCONF($filename, $extKey);
if (is_array($emConf)) {
if (is_array($list[$extKey])) {
$list[$extKey]=array('doubleInstall'=>$list[$extKey]['doubleInstall']);
......
$this->setCat($cat,$list[$extKey], $extKey);
}
} else {
if ($extKey != '.svn' && $extKey != 'CVS') {
debug ($filename, $filename.' not found.', __LINE__, __FILE__);
}
}
}
}
......
* @return array EMconf array values.
*/
function includeEMCONF($path,$_EXTKEY) {
@include($path);
include($path);
if(is_array($EM_CONF[$_EXTKEY])) {
return $this->fixEMCONF($EM_CONF[$_EXTKEY]);
}
t3lib/class.t3lib_extmgm.php (copie de travail)
}
/**
* Displays an error message if the SYS displayErrors is > 0. Call this before every die function to inform about the reason.
*
* @param string error info
* @return void
*/
function displayErrors($errortext='') {
global $TYPO3_CONF_VARS;
if (isset($TYPO3_CONF_VARS['SYS']) && is_array($TYPO3_CONF_VARS['SYS'])) {
$displayErrors = intval($TYPO3_CONF_VARS['SYS']['displayErrors']);
}
if ($displayErrors > 0) {
t3lib_div::debug(array('error message:' => $errortext));
$tmp = debug_backtrace();
t3lib_div::debug($tmp);
}
}
/**
* Returns the absolute path to the extension with extension key $key
* If the extension is not loaded the function will die with an error message
* Useful for internal fileoperations
......
*/
function extPath($key,$script='') {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) {
#debug(array(debug_backtrace()));
t3lib_extMgm::displayErrors();
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extPath)');
}
return PATH_site.$TYPO3_LOADED_EXT[$key]['siteRelPath'].$script;
......
function extRelPath($key) {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) {
t3lib_extMgm::displayErrors();
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extRelPath)');
}
return $TYPO3_LOADED_EXT[$key]['typo3RelPath'];
(3-3/4)