From 69d370dfd7fc3388b60d7b9a1940c5d2921c552c Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 20 Oct 2008 12:38:29 +0000 Subject: [PATCH] MINOR Adjusted i18nTextCollector to use DataObject->i18nCollectStatics() git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@64559 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/i18nTextCollector.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/i18nTextCollector.php b/core/i18nTextCollector.php index 203cefcb7..94cb5596a 100644 --- a/core/i18nTextCollector.php +++ b/core/i18nTextCollector.php @@ -165,6 +165,7 @@ class i18nTextCollector extends Object { !in_array('_manifest_exclude', $items) && !preg_match('/\/tests$/', $folder) ); + if($items && $isValidFolder) foreach($items as $item) { if(substr($item,0,1) == '.') continue; if(substr($item,-4) == '.php') $fileList[substr($item,0,-4)] = "$folder/$item"; @@ -308,14 +309,14 @@ class i18nTextCollector extends Object { return $php; } - protected function collectFromStatics($filePath) { + function collectFromStatics($filePath) { $entitiesArr = array(); $classes = ClassInfo::classes_for_file($filePath); if($classes) foreach($classes as $class) { - if(class_exists($class) && method_exists($class, 'provideI18nStatics')) { + if(class_exists($class) && method_exists($class, 'i18nCollectStatics')) { $obj = singleton($class); - $entitiesArr = array_merge($entitiesArr,(array)$obj->provideI18nStatics()); + $entitiesArr = array_merge($entitiesArr,(array)$obj->i18nCollectStatics()); } }