Project

General

Profile

Bug #19722 » 9981.patch

Administrator Admin, 2009-11-22 15:38

View differences:

typo3/mod/tools/em/class.em_index.php (working copy)
$flag_M = 0;
$flag_B = 0;
$flag_S = 0;
foreach($lines as $k => $l) {
$line = trim($l);
......
$lines[$k] = str_replace($reg[0], '$BACK_PATH=\''.$this->typeBackPaths[$type].'\';', $lines[$k]);
$flag_B = $k+1;
}
// Check if this module uses new API (see http://bugs.typo3.org/view.php?id=5278)
// where TYPO3_MOD_PATH and BACK_PATH are not required
unset($reg);
if (preg_match('/^\$MCONF\[["\']script["\']\][[:space:]]*=[[:space:]]*["\']_DISPATCH["\'][[:space:]]*;/',$line,$reg)) {
$flag_S = $k+1;
}
}
if ($flag_B && $flag_M) {
t3lib_div::writeFile($confFilePath,implode(chr(10),$lines));
return sprintf($GLOBALS['LANG']->getLL('writeModPath_ok'),
substr($confFilePath, strlen(PATH_site)));
} elseif ($flag_S) {
return sprintf($GLOBALS['LANG']->getLL('writeModPath_notRequired'),
substr($confFilePath, strlen(PATH_site)));
} else return $GLOBALS["TBE_TEMPLATE"]->rfw(
sprintf($GLOBALS['LANG']->getLL('writeModPath_error'),
$confFilePath)
typo3/sysext/lang/locallang_mod_tools_em.xml (working copy)
<label index="clearMakeExtDir_could_not_create_dir">ERROR: Could not create extension directory "%s"!</label>
<label index="clearMakeExtDir_no_dir">ERROR: The extension install path "%s" was no directory!</label>
<label index="writeModPath_ok">TYPO3_MOD_PATH and $BACK_PATH were updated in "%s"!</label>
<label index="writeModPath_notRequired">Notice: Module "%s" uses module-API to register module, TYPO3_MOD_PATH and $BACK_PATH not required.</label>
<label index="writeModPath_error">Error: Either TYPO3_MOD_PATH or $BACK_PATH was not found in the "%s" file. You must manually configure that!</label>
<label index="updateLocalEM_CONF_ok">The file "%s" was updated with a cleaned up EM_CONF array.</label>
<label index="updateLocalEM_CONF_not_writable">Error: "%s" was not writable!</label>
(1-1/2)