Project

General

Profile

Bug #17506 » 6103-1.diff

Administrator Admin, 2008-12-22 13:48

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='') {
$displayErrors = (isset($GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors']) ? $GLOBALS['TYPO3_CONF_VARS']['SYS']['displayErrors'] : 0);
if ($displayErrors > 0) {
if ($errortext != '') {
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
......
public static function extPath($key, $script = '') {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) {
#debug(array(debug_backtrace()));
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extPath)');
$errorText = 'TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extPath)';
t3lib_extMgm::displayErrors($errorText);
die($errorText);
}
return PATH_site.$TYPO3_LOADED_EXT[$key]['siteRelPath'].$script;
}
......
public static function extRelPath($key) {
global $TYPO3_LOADED_EXT;
if (!isset($TYPO3_LOADED_EXT[$key])) {
die('TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extRelPath)');
$errorText = 'TYPO3 Fatal Error: Extension key "'.$key.'" was NOT loaded! (t3lib_extMgm::extRelPath)';
t3lib_extMgm::displayErrors($errorText);
die($errorText);
}
return $TYPO3_LOADED_EXT[$key]['typo3RelPath'];
}
(4-4/4)