From 41ca9d742e419bb2d4a5c71fa5ed23de21394ceb Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 30 Nov 2010 22:46:40 -0700 Subject: [PATCH] Need to init bin/translation properly. Things like the injector need to be set. --- horde/bin/translation | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/horde/bin/translation b/horde/bin/translation index 32385f7ba..95ab7ed14 100755 --- a/horde/bin/translation +++ b/horde/bin/translation @@ -612,8 +612,6 @@ function init() $lang = getenv('LANG'); } - $registry = new Horde_Registry(Horde_Registry::SESSION_NONE); - for ($i = 0; $i < count($dirs); $i++) { if (!empty($module) && $module != $apps[$i]) { continue; @@ -621,7 +619,7 @@ function init() $package = ucfirst($apps[$i]); $version = substr($apps[$i], 0, 6) == 'Horde_' ? '' - : ' ' . $registry->getVersion($apps[$i]); + : ' ' . $GLOBALS['registry']->getVersion($apps[$i]); printf('Initializing module %s... ', $apps[$i]); $dir = $dirs[$i] . DS . 'locale' . DS; $pot = $dir . $apps[$i] . '.pot'; @@ -1350,12 +1348,12 @@ if (empty($language)) { } require_once dirname(__FILE__) . '/../lib/Application.php'; +Horde_Registry::appInit('horde', array( + 'authentication' => 'none', + 'cli' => true +)); -$c = new Horde_Cli(); -if (!$c->runningFromCLI()) { - $c->fatal('This script must be run from the command line.'); -} -$c->init(); +$c = $cli; $c->writeln($c->bold('---------------------------')); $c->writeln($c->bold('Horde translation generator')); -- 2.11.0