From c2009025bf99a689167be214374eeed91048d564 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sat, 13 Dec 2008 10:03:37 +0000 Subject: [PATCH] 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 --- core/i18nTextCollector.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/core/i18nTextCollector.php b/core/i18nTextCollector.php index cbd60bdeb..e01999eca 100644 --- a/core/i18nTextCollector.php +++ b/core/i18nTextCollector.php @@ -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);