Move main.php to index.php
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 20 Jan 2010 01:21:47 +0000 (18:21 -0700)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 20 Jan 2010 15:35:07 +0000 (08:35 -0700)
jeta/index.php
jeta/lib/Jeta.php
jeta/main.php [deleted file]

index 8d497e3..956b01c 100644 (file)
@@ -8,4 +8,16 @@
  * @author Eric Rostetter <eric.rostetter@physics.utexas.edu>
  */
 
-require dirname(__FILE__) . '/main.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
+Horde_Registry::appInit('jeta');
+
+$applet = Jeta_Applet::factory($prefs->getValue('sshdriver'));
+
+$template = new Horde_Template();
+$template->set('menu', Jeta::getMenu()->render());
+$template->set('notification', $notification->notify(array('listeners' => 'status')));
+$template->set('applet', $applet->generateAppletCode());
+
+require JETA_TEMPLATES . '/common-header.inc';
+echo $template->fetch(JETA_TEMPLATES . '/main.html');
+require $registry->get('templates', 'horde') . '/common-footer.inc';
index 3900315..daf9c9b 100644 (file)
@@ -8,19 +8,17 @@
  * @author  Michael Slusarz <slusarz@curecanti.org>
  * @package Jeta
  */
-class Jeta {
-
+class Jeta
+{
     /**
      * Build Jeta's list of menu items.
      */
-    function getMenu()
+    public function getMenu()
     {
-        global $registry, $conf;
-
         $menu = new Horde_Menu();
 
         /* Jeta Home. */
-        $menu->addArray(array('url' => Horde::applicationUrl('main.php'), 'text' => _("_Shell"), 'icon' => 'jeta.png', 'class' => (basename($_SERVER['PHP_SELF']) == 'main.php' || basename($_SERVER['PHP_SELF']) == 'index.php') ? 'current' : ''));
+        $menu->addArray(array('url' => Horde::applicationUrl('index.php'), 'text' => _("_Shell"), 'icon' => 'jeta.png', 'class' => (basename($_SERVER['PHP_SELF']) == 'index.php') ? 'current' : ''));
 
         return $menu;
     }
diff --git a/jeta/main.php b/jeta/main.php
deleted file mode 100644 (file)
index 956b01c..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-<?php
-/**
- * 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.
- *
- * @author Eric Rostetter <eric.rostetter@physics.utexas.edu>
- */
-
-require_once dirname(__FILE__) . '/lib/Application.php';
-Horde_Registry::appInit('jeta');
-
-$applet = Jeta_Applet::factory($prefs->getValue('sshdriver'));
-
-$template = new Horde_Template();
-$template->set('menu', Jeta::getMenu()->render());
-$template->set('notification', $notification->notify(array('listeners' => 'status')));
-$template->set('applet', $applet->generateAppletCode());
-
-require JETA_TEMPLATES . '/common-header.inc';
-echo $template->fetch(JETA_TEMPLATES . '/main.html');
-require $registry->get('templates', 'horde') . '/common-footer.inc';