Index: typo3/mod/tools/em/class.em_index.php =================================================================== --- typo3/mod/tools/em/class.em_index.php (revision 6485) +++ typo3/mod/tools/em/class.em_index.php (working copy) @@ -4554,6 +4554,7 @@ $flag_M = 0; $flag_B = 0; + $flag_S = 0; foreach($lines as $k => $l) { $line = trim($l); @@ -4569,12 +4570,23 @@ $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) Index: typo3/sysext/lang/locallang_mod_tools_em.xml =================================================================== --- typo3/sysext/lang/locallang_mod_tools_em.xml (revision 6485) +++ typo3/sysext/lang/locallang_mod_tools_em.xml (working copy) @@ -427,6 +427,7 @@ +