Fix Cli/Horde initialization
authorMichael M Slusarz <slusarz@curecanti.org>
Fri, 5 Mar 2010 06:47:36 +0000 (23:47 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Fri, 5 Mar 2010 07:09:42 +0000 (00:09 -0700)
framework/devtools/horde-check-themes.php

index 0ee34f0..ab0631a 100755 (executable)
  * @author   Marko Djukic <marko@oblo.com>
  */
 
-/* CLI checks and environment setup first. */
-require_once 'Horde/Cli.php';
-
-/* Make sure no one runs this from the web. */
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
+require_once dirname(__FILE__) . '/../lib/Application.php';
+Horde_Registry::appInit('horde', array('authentication' => 'none', 'cli' => true));
 
 /* Get any options. */
 $simple = false;
@@ -48,12 +43,6 @@ if ($horde_base === null) {
     print_usage("You must specify the base path to Horde.");
 }
 
-/* Set up CLI. */
-$cli = Horde_Cli::init();
-
-$horde_authentication = 'none';
-require_once $horde_base . '/lib/base.php';
-
 /* Get the apps and start doing checks. */
 $apps = $registry->listApps(array('hidden', 'notoolbar', 'active', 'admin'));