Fully convert jeta to Horde_Registry_Application
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 20 Jan 2010 01:19:49 +0000 (18:19 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 20 Jan 2010 15:35:07 +0000 (08:35 -0700)
jeta/lib/Application.php
jeta/lib/base.load.php [deleted file]
jeta/lib/base.php [deleted file]
jeta/main.php

index f1f53ac..2851f34 100644 (file)
@@ -1,6 +1,42 @@
 <?php
+/**
+ * Jeta application API.
+ *
+ * This file defines Horde's core API interface. Other core Horde libraries
+ * can interact with Horde through this API.
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @package Jeta
+ */
+
+/* Determine the base directories. */
+if (!defined('JETA_BASE')) {
+    define('JETA_BASE', dirname(__FILE__) . '/..');
+}
+
+if (!defined('HORDE_BASE')) {
+    /* If Horde does not live directly under the app directory, the HORDE_BASE
+     * constant should be defined in config/horde.local.php. */
+    if (file_exists(JETA_BASE . '/config/horde.local.php')) {
+        include JETA_BASE . '/config/horde.local.php';
+    } else {
+        define('HORDE_BASE', JETA_BASE . '/..');
+    }
+}
+
+/* Load the Horde Framework core (needed to autoload
+ * Horde_Registry_Application::). */
+require_once HORDE_BASE . '/lib/core.php';
+
 class Jeta_Application extends Horde_Registry_Application
 {
+    /**
+     * The application's version.
+     *
+     * @var string
+     */
     public $version = 'H4 (2.0-git)';
 
     /**
diff --git a/jeta/lib/base.load.php b/jeta/lib/base.load.php
deleted file mode 100644 (file)
index e55af09..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-<?php
-/**
- * Script to determine the correct *_BASE values.
- *
- * Copyright 2009-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- *
- * @package Jeta
- */
-
-if (!defined('JETA_BASE')) {
-    define('JETA_BASE', dirname(__FILE__) . '/..');
-}
-
-if (!defined('HORDE_BASE')) {
-    /* If horde does not live directly under the app directory, the HORDE_BASE
-     * constant should be defined in config/horde.local.php. */
-    if (file_exists(JETA_BASE . '/config/horde.local.php')) {
-        include JETA_BASE . '/config/horde.local.php';
-    } else {
-        define('HORDE_BASE', JETA_BASE . '/..');
-    }
-}
diff --git a/jeta/lib/base.php b/jeta/lib/base.php
deleted file mode 100644 (file)
index bc71f26..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<?php
-/**
- * Jeta base inclusion file.
- *
- * This file brings in all of the dependencies that every web ssh script
- * will need, and sets up objects that all scripts use.
- *
- * Copyright 2002-2010 The Horde Project (http://www.horde.org/)
- *
- * See the enclosed file COPYING for license information (GPL). If you
- * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
- */
-
-// Determine BASE directories.
-require_once dirname(__FILE__) . '/base.load.php';
-
-// Load the Horde Framework core.
-require_once HORDE_BASE . '/lib/core.php';
-
-// Registry.
-$registry = Horde_Registry::singleton();
-try {
-    $registry->pushApp('jeta', array('logintasks' => true));
-} catch (Horde_Exception $e) {
-    Horde_Auth::authenticateFailure('jeta', $e);
-}
-
-$conf = &$GLOBALS['conf'];
-define('JETA_TEMPLATES', $registry->get('templates'));
-
-// Notification system.
-$notification = Horde_Notification::singleton();
-$notification->attach('status');
index afbf10b..956b01c 100644 (file)
@@ -8,7 +8,8 @@
  * @author Eric Rostetter <eric.rostetter@physics.utexas.edu>
  */
 
-require_once dirname(__FILE__) . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
+Horde_Registry::appInit('jeta');
 
 $applet = Jeta_Applet::factory($prefs->getValue('sshdriver'));