Bug #24151 ยป 16495.patch
typo3/sysext/em/classes/install/class.tx_em_install.php (working copy) | ||
---|---|---|
foreach ($modules as $mD) {
|
||
$confFileName = $extDirPath . $mD . '/conf.php';
|
||
if (@is_file($confFileName)) {
|
||
$messageContent .= tx_em_Tools::writeTYPO3_MOD_PATH($confFileName, $loc, $extKey . '/' . $mD . '/') . '<br />';
|
||
$messageContent .= tx_em_Tools::writeTYPO3_MOD_PATH($confFileName, $loc, $extKey . '/' . $mD . '/', $this->parentObject->typeRelPaths, $this->parentObject->typeBackPaths) . '<br />';
|
||
} else {
|
||
$messageContent .= sprintf($GLOBALS['LANG']->getLL('ext_import_no_conf_file'),
|
||
$confFileName) . '<br />';
|
typo3/sysext/em/classes/tools/class.tx_em_tools.php (working copy) | ||
---|---|---|
*
|
||
* @param string Absolute path to a "conf.php" file of the backend module which we want to write back to.
|
||
* @param string Install scope type: L, G, S
|
||
* @param string Relative path for the module folder in extenson
|
||
* @param string Relative path for the module folder in extension
|
||
* @param array Array of relative paths per install scope type
|
||
* @param array Array of back paths per install scope type
|
||
* @return string Returns message about the status.
|
||
* @see modConfFileAnalysis()
|
||
*/
|
||
function writeTYPO3_MOD_PATH($confFilePath, $type, $mP) {
|
||
function writeTYPO3_MOD_PATH($confFilePath, $type, $mP, $typeRelativePaths, $typeBackPaths) {
|
||
$lines = explode(LF, t3lib_div::getUrl($confFilePath));
|
||
$confFileInfo = array();
|
||
$confFileInfo['lines'] = $lines;
|
||
... | ... | |
unset($reg);
|
||
if (preg_match('/^define[[:space:]]*\([[:space:]]*["\']TYPO3_MOD_PATH["\'][[:space:]]*,[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*\)[[:space:]]*;/', $line, $reg)) {
|
||
$lines[$k] = str_replace($reg[0], 'define(\'TYPO3_MOD_PATH\', \'' . $this->typeRelPaths[$type] . $mP . '\');', $lines[$k]);
|
||
$lines[$k] = str_replace($reg[0], 'define(\'TYPO3_MOD_PATH\', \'' . $typeRelativePaths[$type] . $mP . '\');', $lines[$k]);
|
||
$flag_M = $k + 1;
|
||
}
|
||
unset($reg);
|
||
if (preg_match('/^\$BACK_PATH[[:space:]]*=[[:space:]]*["\']([[:alnum:]_\/\.]+)["\'][[:space:]]*;/', $line, $reg)) {
|
||
$lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . $this->typeBackPaths[$type] . '\';', $lines[$k]);
|
||
$lines[$k] = str_replace($reg[0], '$BACK_PATH=\'' . $typeBackPaths[$type] . '\';', $lines[$k]);
|
||
$flag_B = $k + 1;
|
||
}
|
||