BUGFIX Don't overwrite existing module arrays in i18nTextcollector - fixing bug with entities for "foreign modules" being reset during parsing

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.3@68746 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Ingo Schommer 2008-12-13 10:03:37 +00:00 committed by Sam Minnee
parent b32226f809
commit c2009025bf

View File

@ -93,7 +93,13 @@ class i18nTextCollector extends Object {
if(!$isValidModuleFolder) continue;
// we store the master string tables
$entitiesByModule[$module] = $this->processModule($module);
$processedEntities = $this->processModule($module);
if(isset($entitiesByModule[$module])) {
$entitiesByModule[$module] = array_merge_recursive($entitiesByModule[$module], $processedEntities);
} else {
$entitiesByModule[$module] = $processedEntities;
}
// extract all entities for "foreign" modules (fourth argument)
foreach($entitiesByModule[$module] as $fullName => $spec) {
@ -106,7 +112,7 @@ class i18nTextCollector extends Object {
}
}
}
// Write the generated master string tables
$this->writeMasterStringFile($entitiesByModule);