Project

General

Profile

Bug #18369 » patch2-7753.diff

Administrator Admin, 2010-05-01 08:46

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__);
}
}
}
}
......
}
}
//
$XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && \$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]/', $fContent, 2);
$XclassSearch = '\$TYPO3_CONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]';
$XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && ' . $XclassSearch . '/', $fContent, 2);
if (count($XclassParts)!=2) {
$XclassSearch = '\$GLOBALS\[[\'"]TYPO3_CONF_VARS[\'"]\]\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]';
$XclassParts = preg_split('/if \(defined\([\'"]TYPO3_MODE[\'"]\) && ' . $XclassSearch . '/', $fContent, 2);
}
if (count($XclassParts)==2) {
unset($reg);
preg_match('/^\[[\'"]([[:alnum:]_\/\.]*)[\'"]\]/',$XclassParts[1],$reg);
if ($reg[1]) {
$cmpF = 'ext/'.$extKey.'/'.$fileName;
if (!strcmp($reg[1],$cmpF)) {
if (preg_match('/_once[[:space:]]*\(\$TYPO3_.ONF_VARS\[TYPO3_MODE\]\[[\'"]XCLASS[\'"]\]\[[\'"]'.preg_quote($cmpF,'/').'[\'"]\]\);/', $XclassParts[1])) {
if (preg_match('/_once[[:space:]]*\('.$XclassSearch.'\[[\'"]'.preg_quote($cmpF,'/').'[\'"]\]\);/', $XclassParts[1])) {
$out['msg'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_xclass_ok'), $fileName);
} else $out['errors'][] = $GLOBALS['LANG']->getLL('detailedExtAnalysis_xclass_no_include');
} else $out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_xclass_incorrect'),
$reg[1], $cmpF
);
} else $out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_no_xclass_filename'), $fileName);
} elseif (!$this->first_in_array('ux_', $out['files'][$fileName]['classes'])) $out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_no_xclass_found'), $fileName);
} elseif (!$this->first_in_array('ux_', $out['files'][$fileName]['classes'])) {
// a filename containing 'div' does not need to have a XCLASS
if (strpos($fileName,'_div') === FALSE) {
$out['errors'][] = sprintf($GLOBALS['LANG']->getLL('detailedExtAnalysis_no_xclass_found'), $fileName);
}
}
}
}
}
......
*/
function includeEMCONF($path, $_EXTKEY) {
$EM_CONF = NULL;
@include($path);
include($path);
if(is_array($EM_CONF[$_EXTKEY])) {
return $this->fixEMCONF($EM_CONF[$_EXTKEY]);
}
(3-3/4)