Permalink
Browse files

MINOR reverted changes to i18nTextCollector, and updated documentatio…

…n (merged from r91211)

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/branches/2.4@91212 467b73ca-7a2a-4603-9d3b-597d59a354a9
  • Loading branch information...
1 parent e2a3cb2 commit 856a7f32ab4d7df4280d2a772a70f6f5e9a60bbd @chillu chillu committed with sminnee Nov 10, 2009
Showing with 11 additions and 11 deletions.
  1. +11 −11 core/i18nTextCollector.php
View
@@ -13,10 +13,10 @@
* The collector needs to be run whenever you make new translatable
* entities available. Please don't alter the arrays in language tables manually.
*
- * Usage through URL: http://localhost/dev/tasks/i18nTextCollector
- * Usage through URL (module-specific): http://localhost/dev/tasks/i18nTextCollector/?module=mymodule
- * Usage on CLI: sake dev/tasks/i18nTextCollector
- * Usage on CLI (module-specific): sake dev/tasks/i18nTextCollector module=mymodule
+ * Usage through URL: http://localhost/dev/tasks/i18nTextCollectorTast
+ * Usage through URL (module-specific): http://localhost/dev/tasks/i18nTextCollectorTask/?module=mymodule
+ * Usage on CLI: sake dev/tasks/i18nTextCollectorTask
+ * Usage on CLI (module-specific): sake dev/tasks/i18nTextCollectorTask module=mymodule
*
* Requires PHP 5.1+ due to class_implements() limitations
*
@@ -27,7 +27,7 @@
* @uses i18nEntityProvider
* @uses i18n
*/
-class i18nTextCollector extends BuildTask {
+class i18nTextCollector extends Object {
protected $defaultLocale;
@@ -75,13 +75,13 @@ public function run($restrictToModules = null) {
$entitiesByModule = array();
//Search for and process existent modules, or use the passed one instead
- // if($restrictToModules && count($restrictToModules)) {
- // foreach($restrictToModules as $restrictToModule) {
- // $modules[] = basename($restrictToModule);
- // }
- // } else {
+ if($restrictToModules && count($restrictToModules)) {
+ foreach($restrictToModules as $restrictToModule) {
+ $modules[] = basename($restrictToModule);
+ }
+ } else {
$modules = scandir($this->basePath);
- // }
+ }
foreach($modules as $module) {
// Only search for calls in folder with a _config.php file (which means they are modules)

0 comments on commit 856a7f3

Please sign in to comment.