<?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)';
/**
+++ /dev/null
-<?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 . '/..');
- }
-}
+++ /dev/null
-<?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');
* @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'));