From: Michael M Slusarz Date: Thu, 28 Jan 2010 21:57:04 +0000 (-0700) Subject: CLI initialization must occur before Registry initialization X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9ffde44964026cfd98956c7803b42794cf1d7dcb;p=horde.git CLI initialization must occur before Registry initialization --- diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 1a8465bef..b2fe5c113 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -141,6 +141,21 @@ class Horde_Registry 'user_admin' => null ), $args); + /* CLI initialization. */ + if ($args['cli']) { + /* Make sure no one runs from the web. */ + if (!Horde_Cli::runningFromCLI()) { + fwrite(STDERR, "Must be run from the command line\n"); + exit(1); + } + + /* Load the CLI environment - make sure there's no time limit, + * init some variables, etc. */ + Horde_Cli::init(); + + $args['nocompress'] = true; + } + // Registry. $s_ctrl = 0; switch ($args['session_control']) { @@ -179,21 +194,6 @@ class Horde_Registry Horde_Auth::authenticateFailure($app, $e); } - /* CLI initialization. */ - if ($args['cli']) { - /* Make sure no one runs from the web. */ - if (!Horde_Cli::runningFromCLI()) { - fwrite(STDERR, "Must be run from the command line\n"); - exit(1); - } - - /* Load the CLI environment - make sure there's no time limit, - * init some variables, etc. */ - Horde_Cli::init(); - - $args['nocompress'] = true; - } - if (!$args['nocompress']) { Horde::compressOutput(); }