More H4 Jonah conversion
authorMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 May 2010 23:15:49 +0000 (17:15 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Tue, 4 May 2010 23:18:08 +0000 (17:18 -0600)
50 files changed:
jonah/README
jonah/channels/aggregate.php
jonah/channels/delete.php
jonah/channels/edit.php
jonah/channels/index.php
jonah/config/conf.xml
jonah/config/templates.php.dist
jonah/delivery/html.php
jonah/delivery/index.php
jonah/delivery/rss.php
jonah/dispatcher.php
jonah/docs/CHANGES
jonah/docs/INSTALL
jonah/docs/TODO [deleted file]
jonah/feed.php
jonah/index.php
jonah/lib/Api.php
jonah/lib/Application.php
jonah/lib/Block/cloud.php
jonah/lib/Block/delivery.php
jonah/lib/Block/latest.php
jonah/lib/Block/news.php
jonah/lib/Block/news_popular.php
jonah/lib/Block/story.php
jonah/lib/Block/tree_menu.php
jonah/lib/Driver.php
jonah/lib/Driver/sql.php
jonah/lib/FeedParser.php
jonah/lib/Forms/Feed.php
jonah/lib/Forms/Story.php
jonah/lib/Jonah.php
jonah/lib/News.php
jonah/lib/News/sql.php
jonah/lib/Test.php [new file with mode: 0644]
jonah/lib/version.php [deleted file]
jonah/scripts/feed_tester.php
jonah/scripts/sql/jonah.mssql.sql
jonah/scripts/sql/jonah.sql
jonah/scripts/upgrades/2008-08-22_add_channel_slugs.sql
jonah/scripts/upgrades/2008-08-22_add_story_authors.sql
jonah/scripts/upgrades/2008-12-17_add_full_feed.sql
jonah/stories/delete.php
jonah/stories/index.php
jonah/stories/pdf.php
jonah/stories/results.php
jonah/stories/share.php
jonah/stories/view.php
jonah/templates/common-header.inc
jonah/test.php [deleted file]
jonah/themes/screen.css

index 9e815e2..4acfed1 100644 (file)
@@ -1,5 +1,4 @@
 Jonah
-Version 0.1
 
 What is Jonah?
 --------------
@@ -18,7 +17,7 @@ Jonah Documentation
 LICENSE       - Jonah's license
 README        - This file
 docs/CHANGES  - A list of changes by release
-docs/CREDITS  - Who developed this 
+docs/CREDITS  - Who developed this
 docs/HELP     - How you can help
 docs/INSTALL  - Installation instructions and notes
 
index 97ca050..afdb202 100644 (file)
@@ -2,16 +2,13 @@
 /**
  * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
- * $Horde: jonah/channels/aggregate.php,v 1.19 2009/11/24 04:15:37 chuck Exp $
- *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE.
  *
  * @author Jan Schneider <jan@horde.org>
  */
 
-@define('JONAH_BASE', dirname(__FILE__) . '/..');
-require_once dirname(__FILE__) . '/../lib/Application.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
 $jonah = Horde_Registry::appInit('jonah');
 
 function _getLinks($id, $subid, $name, $title)
index 4882e35..1b3d043 100644 (file)
@@ -11,8 +11,7 @@
  * @author Marko Djukic <marko@oblo.com>
  */
 
-define('JONAH_BASE', dirname(__FILE__) . '/..');
-require_once dirname(__FILE__) . '/../lib/Application.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
 $jonah = Horde_Registry::appInit('jonah');
 require_once 'Horde/Form.php';
 require_once 'Horde/Form/Renderer.php';
index d76050f..58f4014 100644 (file)
@@ -11,8 +11,7 @@
  * @author Marko Djukic <marko@oblo.com>
  */
 
-@define('JONAH_BASE', dirname(__FILE__) . '/..');
-require_once dirname(__FILE__) . '/../lib/Application.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
 $jonah = Horde_Registry::appInit('jonah');
 require_once JONAH_BASE . '/lib/Forms/Feed.php';
 require_once 'Horde/Form/Renderer.php';
index 6121720..aa04165 100644 (file)
@@ -11,7 +11,7 @@
  * @author Marko Djukic <marko@oblo.com>
  */
 
-require_once dirname(__FILE__) . '/../lib/Application.php';
+require_once dirname(__FILE__) . '/lib/Application.php';
 $jonah = Horde_Registry::appInit('jonah');
 
 if (!Jonah::checkPermissions('jonah:news', Horde_Perms::EDIT)) {
index 3292136..76f4d6a 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<!-- $Horde: jonah/config/conf.xml,v 1.37 2008/06/29 23:17:13 chuck Exp $ -->
+<!-- $Id$ -->
 <configuration>
 
  <configsection name="news">
index 044376f..b380c46 100644 (file)
@@ -1,9 +1,9 @@
 <?php
 /**
- * $Horde: jonah/config/templates.php.dist,v 1.15 2007/10/10 03:49:00 mrubinsk Exp $
- *
  * This file stores the templates used to generate different views of
  * news channels.
+ *
+ * $Id$
  */
 
 $templates['standard'] = array('name' => _("Standard"),
index 6f6f3d1..c2cfbcf 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * Script to handle requests for html delivery of stories.
  *
- * $Horde: jonah/delivery/html.php,v 1.24 2009/06/10 05:24:47 slusarz Exp $
- *
  * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
  * @author Jan Schneider <jan@horde.org>
  */
 
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
-require_once dirname(__FILE__) . '/lib/Application.php';
-$jonah = Horde_Registry::appInit('jonah');
+require_once dirname(__FILE__) . '/../lib/Application.php';
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
 require JONAH_BASE . '/config/templates.php';
 
 // TODO - check if a user, have button to add channel to their
index 475c539..6669b3d 100644 (file)
@@ -24,7 +24,6 @@ foreach ($parts as $part) {
     if (strpos($part, '.') !== false) {
         $deliveryType = substr($part, strrpos($part, '.') + 1);
         $part = substr($part, 0, strrpos($part, '.'));
-        
     }
 
     switch($part) {
index 8d2f774..7d0a619 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * $Horde: jonah/delivery/rss.php,v 1.41 2010/01/04 02:23:14 chuck Exp $
- *
  * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did
  * @author Chuck Hagenbuch <chuck@horde.org>
  */
 
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
-require_once dirname(__FILE__) . '/lib/Application.php';
-$jonah = Horde_Registry::appInit('jonah');
-require_once JONAH_BASE . '/lib/version.php';
+require_once dirname(__FILE__) . '/../lib/Application.php';
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
 
 $news = Jonah_News::factory();
 
@@ -65,7 +63,7 @@ if (is_a($stories, 'PEAR_Error')) {
 
 $template = new Horde_Template();
 $template->set('charset', Horde_Nls::getCharset());
-$template->set('jonah', 'Jonah ' . JONAH_VERSION . ' (http://www.horde.org/jonah/)');
+$template->set('jonah', 'Jonah ' . $registry->getVersion() . ' (http://www.horde.org/jonah/)');
 $template->set('xsl', $registry->get('themesuri') . '/feed-rss.xsl');
 if (!empty($criteria['tag_id'])) {
     $template->set('channel_name', sprintf(_("Stories tagged with %s in %s"), $tag_name, @htmlspecialchars($channel['channel_name'], ENT_COMPAT, Horde_Nls::getCharset())));
index 4773c6d..49e59f0 100644 (file)
@@ -7,10 +7,14 @@
  *
  * @author Ben Klang <ben@alkaloid.net>
  */
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
-require_once dirname(__FILE__) . '/lib/Application.php';
+
+require_once dirname(__FILE__) . '/../lib/Application.php';
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
 $jonah = Horde_Registry::appInit('jonah');
+
 require JONAH_BASE . '/config/templates.php';
 
 // Grab, and hopefully match, the URL
index 52874d1..dca43bc 100644 (file)
@@ -1,3 +1,10 @@
+--------
+v1.0-git
+--------
+
+[bak/mjr/mms] Converted to H4.
+
+
 ----
 v0.1
 ----
index 9f699d0..e67fd03 100644 (file)
@@ -1,6 +1,6 @@
-==========================
-|| INSTALLING Jonah 0.1 ||
-==========================
+======================
+|| INSTALLING Jonah ||
+======================
 
 This document contains instructions for installing the Jonah software
 on your system.
@@ -230,5 +230,3 @@ QQQQQQWQQ@CauqmQQQQQQQQQWQQWQQQQQQQQQWQQWQQQQQQQWQQQQQQQQQQQQQQQQQQQQQQQQQQQWQQ
 QQQQBVbaoX2v2dWQQQQQQQQQQQQQQQQQQWQQQQQQQQQQQQWQQQQWQQQQQQWQQQQQWQQWQQQQWQQWQQQ
 QP5###Z#XXoSZLJQQQQQQQQWQQWQQQWQQQQQWQQQWQQQWQQQQQQQQQWQWQQQQQWQQQQQQQWQQQQQQQQ
 ===============================================================================
-
-$Horde: jonah/docs/INSTALL,v 1.21 2007/06/19 09:56:35 jan Exp $
diff --git a/jonah/docs/TODO b/jonah/docs/TODO
deleted file mode 100644 (file)
index faac774..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-=============================
- Jonah Development TODO List
-=============================
-
-:Last update:   $Date: 2007/12/14 18:31:17 $
-:Revision:      $Revision: 1.7 $
-:Contact:       dev@lists.horde.org
-
-$Horde: jonah/docs/TODO,v 1.7 2007/12/14 18:31:17 mrubinsk Exp $
index 2d7fb21..1024377 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * Script to handle requests for html delivery of stories.
  *
- * $Horde: jonah/feed.php,v 1.6 2009/06/10 05:24:46 slusarz Exp $
- *
  * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
  * @author Jan Schneider <jan@horde.org>
  */
 
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/lib/Application.php';
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
 $jonah = Horde_Registry::appInit('jonah');
+
 require JONAH_BASE . '/config/templates.php';
 
 /* Get the id and format of the feed to display. */
index 47fe564..cc5e6a4 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * $Horde: jonah/index.php,v 1.39 2009/07/17 20:30:28 chuck Exp $
- *
  * Copyright 1999-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
@@ -10,15 +8,4 @@
  * @author Chuck Hagenbuch <chuck@horde.org>
  */
 
-@define('JONAH_BASE', dirname(__FILE__));
-$jonah_configured = (is_readable(JONAH_BASE . '/config/conf.php') &&
-                     is_readable(JONAH_BASE . '/config/templates.php'));
-
-if (!$jonah_configured) {
-    require JONAH_BASE . '/../lib/Test.php';
-    Horde_Test::configFilesMissing('Jonah', JONAH_BASE,
-        array('conf.php'),
-        array('templates.php' => 'This file defines the HTML (or other) templates that are used to generate different views of the news channels that Jonah provides.'));
-}
-
-require JONAH_BASE . '/channels/index.php';
+require dirname(__FILE__) . '/channels/index.php';
index 6a2aa6a..6d67dda 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * Jonah external API interface.
  *
- * $Horde: jonah/lib/Api.php,v 1.1 2009/11/11 01:32:03 mrubinsk Exp $
- *
  * This file defines Jonah's external API interface. Other
  * applications can interact with Jonah through this API.
  *
@@ -231,4 +229,4 @@ class Jonah_Api extends Horde_Registry_Api
         return $results;
     }
 
-}
\ No newline at end of file
+}
index 2535300..4d61a80 100644 (file)
@@ -4,6 +4,7 @@
  *
  * @package Jonah
  */
+
 if (!defined('JONAH_BASE')) {
     define('JONAH_BASE', dirname(__FILE__). '/..');
 }
@@ -92,4 +93,4 @@ class Jonah_Application extends Horde_Registry_Application
         return Jonah::getMenu();
     }
 
-}
\ No newline at end of file
+}
index 178c16b..2cf1c1a 100644 (file)
@@ -5,8 +5,6 @@ $block_name = _("Tag Cloud");
 /**
  * Display Tag Cloud
  *
- * $Horde: jonah/lib/Block/cloud.php,v 1.11 2009/12/10 17:42:36 jan Exp $
- *
  * Copyright 2007-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file COPYING for license information (GPL). If you
index f03c6ed..7e6c74e 100644 (file)
@@ -6,8 +6,6 @@ $block_name = _("Feeds");
  * This class extends Horde_Block:: to provide a list of deliverable internal
  * channels.
  *
- * $Horde: jonah/lib/Block/delivery.php,v 1.22 2009/06/10 05:24:47 slusarz Exp $
- *
  * Copyright 2004-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index e917122..9b0a3a6 100644 (file)
@@ -6,8 +6,6 @@ $block_name = _("Latest News");
  * This class extends Horde_Block:: to provide the api to embed news
  * in other Horde applications.
  *
- * $Horde: jonah/lib/Block/latest.php,v 1.24 2009/07/09 08:18:26 slusarz Exp $
- *
  * Copyright 2002-2007 Roel Gloudemans <roel@gloudemans.info>
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index d2bc844..50e5690 100644 (file)
@@ -6,8 +6,6 @@ $block_name = _("Feed");
  * This class extends Horde_Block:: to provide an api to embed news
  * in other Horde applications.
  *
- * $Horde: jonah/lib/Block/news.php,v 1.49 2009/07/09 08:18:26 slusarz Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
@@ -22,7 +20,7 @@ class Horde_Block_Jonah_news extends Horde_Block {
 
     function _params()
     {
-        require_once dirname(__FILE__) . '/../../lib/Application.php';
+        require_once dirname(__FILE__) . '/../Application.php';
         require JONAH_BASE . '/config/templates.php';
 
         $params['source'] = array('name' => _("Feed"),
@@ -82,7 +80,6 @@ class Horde_Block_Jonah_news extends Horde_Block {
             return _("No feed specified.");
         }
 
-        require_once 'Horde/Template.php';
         $news = Jonah_News::factory();
         $params = $this->_params();
 
index 28adc4f..af29ef8 100644 (file)
@@ -6,8 +6,6 @@ $block_name = _("Most Popular Stories");
  * This class extends Horde_Block:: to provide an api to embed news
  * in other Horde applications.
  *
- * $Horde: jonah/lib/Block/news_popular.php,v 1.9 2009/07/09 08:18:26 slusarz Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
@@ -80,7 +78,6 @@ class Horde_Block_Jonah_news_popular extends Horde_Block {
             return _("No feed specified.");
         }
 
-        require_once 'Horde/Template.php';
         $news = Jonah_News::factory();
         $params = $this->_params();
 
index c618b5b..ad2c1fb 100644 (file)
@@ -6,8 +6,6 @@ $block_name = _("Story");
  * This class extends Horde_Block:: to provide the api to embed news
  * in other Horde applications.
  *
- * $Horde: jonah/lib/Block/story.php,v 1.11 2009/07/09 08:18:26 slusarz Exp $
- *
  * Copyright 2002-2007 Roel Gloudemans <roel@gloudemans.info>
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index 59f782b..7a2f70e 100644 (file)
@@ -4,8 +4,6 @@ $block_name = _("Menu List");
 $block_type = 'tree';
 
 /**
- * $Horde: jonah/lib/Block/tree_menu.php,v 1.7 2009/12/03 15:28:22 chuck Exp $
- *
  * @package Horde_Block
  */
 class Horde_Block_jonah_tree_menu extends Horde_Block {
index ee4b0a1..163285c 100644 (file)
@@ -1,17 +1,8 @@
 <?php
 /**
- * @package Jonah
- */
-
-/** Horde_Array */
-require_once 'Horde/Array.php';
-
-/**
  * Jonah_Driver:: is responsible for storing, searching, sorting and filtering
  * locally generated and managed articles.  Aggregation is left to Hippo.
  *
- * $Horde: jonah/lib/Driver.php,v 1.7 2009/07/09 08:18:26 slusarz Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
index caf7651..3d07758 100644 (file)
@@ -19,8 +19,6 @@
  * The table structure can be created by the scripts/db/jonah_news.sql
  * script. The needed tables are jonah_channels and jonah_stories.
  *
- * $Horde: jonah/lib/Driver/sql.php,v 1.10 2010/02/01 10:32:04 jan Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
@@ -796,8 +794,6 @@ class Jonah_Driver_sql extends Jonah_Driver {
      */
     function listTagInfo($tags = array(), $channel_id = null)
     {
-        require_once 'Horde/Cache.php';
-
         if (is_a(($result = $this->_connect()), 'PEAR_Error')) {
             return $result;
         }
@@ -1039,7 +1035,6 @@ class Jonah_Driver_sql extends Jonah_Driver {
         }
 
         /* Connect to the SQL server using the supplied parameters. */
-        require_once 'DB.php';
         $this->_db = &DB::connect($this->_params,
                                   array('persistent' => !empty($this->_params['persistent'])));
         if (is_a($this->_db, 'PEAR_Error')) {
index 13a3b33..5ffbd04 100644 (file)
@@ -9,8 +9,6 @@
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  * General Public License for more details.
  *
- * $Horde: jonah/lib/FeedParser.php,v 1.23 2009/06/10 05:24:47 slusarz Exp $
- *
  * @author  Chuck Hagenbuch <chuck@horde.org>
  * @package Jonah
  */
index fc30f52..6f0823d 100644 (file)
@@ -17,8 +17,6 @@ require_once 'Horde/Form/Action.php';
  * This class extends Horde_Form to provide the form to add/edit
  * feeds.
  *
- * $Horde: jonah/lib/Forms/Feed.php,v 1.16 2009/06/10 05:24:48 slusarz Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index 68f334e..1d460cc 100644 (file)
@@ -17,8 +17,6 @@ require_once 'Horde/Form/Action.php';
  * This class extends Horde_Form to provide the form to add/edit
  * stories.
  *
- * $Horde: jonah/lib/Forms/Story.php,v 1.14 2009/02/16 16:47:03 chuck Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index 8b56613..8503147 100644 (file)
@@ -6,15 +6,12 @@
 /**
  * Jonah Base Class.
  *
- * $Horde: jonah/lib/Jonah.php,v 1.141 2009/11/24 04:15:37 chuck Exp $
- *
  * @author  Chuck Hagenbuch <chuck@horde.org>
  * @author  Eric Rechlin <eric@hpcalc.org>
  * @package Jonah
  */
 class Jonah {
 
-
     /**
      * Internal Jonah channel.
      */
@@ -55,7 +52,6 @@ class Jonah {
             $options = array_merge($options, $conf['http']['proxy']);
         }
 
-        require_once 'HTTP/Request.php';
         $http = new HTTP_Request($url, $options);
         @$http->sendRequest();
         if ($http->getResponseCode() != 200) {
index 5a39d8f..1d5c5a9 100644 (file)
@@ -1,17 +1,8 @@
 <?php
 /**
- * @package Jonah
- */
-
-/** Horde_Array */
-require_once 'Horde/Array.php';
-
-/**
  * Jonah_News:: is the main class for handling news headlines for Jonah both
  * from internal Jonah generated news sources and external channels.
  *
- * $Horde: jonah/lib/News.php,v 1.164 2010/02/01 10:32:05 jan Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
@@ -406,9 +397,6 @@ class Jonah_News {
      */
     function fetchExternalStories($channel_id, $url, $interval)
     {
-        require_once 'Horde/Cache.php';
-        require_once 'Horde/Serialize.php';
-
         $cache = $GLOBALS['injector']->getInstance('Horde_Cache');
         $timestamp = time();
         if (is_a($cache, 'Horde_Cache') && ($stories = $cache->get($url, $interval))) {
index f0a2848..9c2040b 100644 (file)
@@ -19,8 +19,6 @@
  * The table structure can be created by the scripts/db/jonah_news.sql
  * script. The needed tables are jonah_channels and jonah_stories.
  *
- * $Horde: jonah/lib/News/sql.php,v 1.119 2010/02/01 10:32:04 jan Exp $
- *
  * Copyright 2002-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you did not
@@ -634,8 +632,6 @@ class Jonah_News_sql extends Jonah_News {
      */
     function listTagInfo($tags = array(), $channel_id = null)
     {
-        require_once 'Horde/Cache.php';
-
         if (is_a(($result = $this->_connect()), 'PEAR_Error')) {
             return $result;
         }
@@ -877,7 +873,6 @@ class Jonah_News_sql extends Jonah_News {
         }
 
         /* Connect to the SQL server using the supplied parameters. */
-        require_once 'DB.php';
         $this->_db = &DB::connect($this->_params,
                                   array('persistent' => !empty($this->_params['persistent'])));
         if (is_a($this->_db, 'PEAR_Error')) {
diff --git a/jonah/lib/Test.php b/jonah/lib/Test.php
new file mode 100644 (file)
index 0000000..3d8381b
--- /dev/null
@@ -0,0 +1,70 @@
+<?php
+/**
+ * This class provides the Jonah configuration for the test script.
+ *
+ * Copyright 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  Michael Slusarz <slusarz@horde.org>
+ * @package Jonah
+ */
+class Jonah_Test extends Horde_Test
+{
+    /**
+     * The module list
+     *
+     * @var array
+     */
+    protected $_moduleList = array(
+        'gettext'  =>  array(
+            'descrip' => 'Gettext Support',
+            'error' => 'Jonah will not run without gettext support. Compile php <code>--with-gettext</code> before continuing.'
+        ),
+        'xml'  =>  array(
+            'descrip' => 'XML Support',
+            'error' => 'Without XML support, Jonah WILL NOT WORK. You must fix this before going any further.'
+        )
+    );
+
+    /**
+     * PHP settings list.
+     *
+     * @var array
+     */
+    protected $_settingsList = array();
+
+    /**
+     * PEAR modules list.
+     *
+     * @var array
+     */
+    protected $_pearList = array();
+
+    /**
+     * Required configuration files.
+     *
+     * @var array
+     */
+    protected $_fileList = array(
+        'config/conf.php' => null
+    );
+
+    /**
+     * Inter-Horde application dependencies.
+     *
+     * @var array
+     */
+    protected $_appList = array();
+
+    /**
+     * Any application specific tests that need to be done.
+     *
+     * @return string  HTML output.
+     */
+    public function appTests()
+    {
+    }
+
+}
diff --git a/jonah/lib/version.php b/jonah/lib/version.php
deleted file mode 100644 (file)
index 07bff53..0000000
+++ /dev/null
@@ -1 +0,0 @@
-<?php define('JONAH_VERSION', 'H4 (1.0-cvs)') ?>
index b8f5fde..9cb386d 100755 (executable)
@@ -1,41 +1,12 @@
 #!/usr/bin/php -q
 <?php
 /**
- * $Horde: jonah/scripts/feed_tester.php,v 1.7 2009/07/09 06:08:48 slusarz Exp $
- *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE.
  */
 
-// Find the base file path of Horde.
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-
-// Find the base file path of Jonah.
-@define('JONAH_BASE', dirname(__FILE__) . '/..');
-
-// Do CLI checks and environment setup first.
-require_once HORDE_BASE . '/lib/core.php';
-
-// Make sure no one runs this from the web.
-if (!Horde_Cli::runningFromCLI()) {
-    exit("Must be run from the command line\n");
-}
-
-// Load the CLI environment - make sure there's no time limit, init
-// some variables, etc.
-Horde_Cli::init();
-$cli = &Horde_Cli::singleton();
-
-// Now load the Registry and setup conf, etc.
-$registry = Horde_Registry::singleton();
-$registry->pushApp('jonah', false);
-
-// Include needed libraries.
-require_once JONAH_BASE . '/lib/Jonah.php';
-require_once JONAH_BASE . '/lib/FeedParser.php';
-
-/* Make sure there's no compression. */
-@ob_end_clean();
+require_once dirname(__FILE__) . '/../lib/Application.php';
+Horde_Registry::appInit('jonah', array('authentication' => 'none', 'cli' => true));
 
 if (empty($argv[1]) || !file_exists($argv[1])) {
     exit("Need a valid filename.\n");
index 8463d38..7c8caec 100644 (file)
@@ -1,5 +1,3 @@
--- $Horde: jonah/scripts/sql/jonah.mssql.sql,v 1.9 2009/10/20 21:28:29 jan Exp $
-
 CREATE TABLE jonah_channels (
     channel_id        INT NOT NULL,
     channel_slug      VARCHAR(64) NOT NULL,
index 40b7853..a103b8c 100644 (file)
@@ -1,5 +1,3 @@
--- $Horde: jonah/scripts/sql/jonah.sql,v 1.17 2009/10/20 21:28:30 jan Exp $
-
 CREATE TABLE jonah_channels (
     channel_id        INT NOT NULL,
     channel_slug      VARCHAR(64) NOT NULL,
index 80b05a4..d01fa53 100644 (file)
@@ -1,6 +1,3 @@
---
--- $Horde: jonah/scripts/upgrades/2008-08-22_add_channel_slugs.sql,v 1.1 2008/08/23 02:02:37 bklang Exp $
---
 ALTER TABLE jonah_channels ADD COLUMN `channel_slug` VARCHAR(64);
 UPDATE jonah_channels SET channel_slug=channel_id;
 ALTER TABLE jonah_channels CHANGE channel_slug channel_slug VARCHAR(64) NOT NULL;
index a381c6f..5ff563f 100644 (file)
@@ -1,6 +1,3 @@
---
--- $Horde: jonah/scripts/upgrades/2008-08-22_add_story_authors.sql,v 1.1 2008/08/23 02:48:34 bklang Exp $
---
 ALTER TABLE jonah_stories ADD COLUMN story_author VARCHAR(255);
 UPDATE jonah_stories SET story_author='Anonymous';
 ALTER TABLE jonah_stories CHANGE COLUMN story_author story_author VARCHAR(255) NOT NULL;
index b59c168..7cfff66 100644 (file)
@@ -1,6 +1,3 @@
---
--- $Horde: jonah/scripts/upgrades/2008-12-17_add_full_feed.sql,v 1.2 2009/10/20 21:28:30 jan Exp $
---
 ALTER TABLE jonah_channels ADD COLUMN `channel_full_feed` SMALLINT;
 UPDATE jonah_channels SET channel_full_feed = 0;
 ALTER TABLE jonah_channels CHANGE channel_full_feed channel_full_feed SMALLINT DEFAULT 0 NOT NULL;
index 0a1330f..1013270 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * $Horde: jonah/stories/delete.php,v 1.40 2009/11/24 04:15:38 chuck Exp $
- *
  * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
index 0ec03ac..dfff3ef 100644 (file)
@@ -2,8 +2,6 @@
 /**
  * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
  *
- * $Horde: jonah/stories/index.php,v 1.70 2009/11/24 04:15:38 chuck Exp $
- *
  * See the enclosed file LICENSE for license information (BSD). If you
  * did not receive this file, see http://cvs.horde.org/co.php/jonah/LICENSE.
  *
index e618441..d29a80d 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * $Horde: jonah/stories/pdf.php,v 1.8 2009/06/10 17:20:11 slusarz Exp $
- *
  * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
@@ -19,11 +17,11 @@ function _exit($message)
     exit;
 }
 
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/../lib/Application.php';
-$jonah = Horde_Registry::appInit('jonah');
-require_once 'File/PDF.php';
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
 
 $news = Jonah_News::factory();
 
index 83ef79c..bf2e962 100644 (file)
@@ -2,9 +2,8 @@
 /**
  * Display list of articles that match a tag query from an internal
  * channel.
- *
- * $Horde: jonah/stories/results.php,v 1.5 2009/11/24 04:15:38 chuck Exp $
  */
+
 require_once dirname(__FILE__) . '/../lib/Application.php';
 $jonah = Horde_Registry::appInit('jonah');
 
index e8330be..bf51b33 100644 (file)
@@ -13,12 +13,11 @@ function _mail($story_part, $from, $recipients, $subject, $note)
     global $conf;
 
     /* Create the MIME message. */
-    require_once JONAH_BASE . '/lib/version.php';
     $mail = new Horde_Mime_Mail(array('subject' => $subject,
                                       'to' => $recipients,
                                       'from' => $from,
                                       'charset' => Horde_Nls::getCharset()));
-    $mail->addHeader('User-Agent', 'Jonah ' . JONAH_VERSION);
+    $mail->addHeader('User-Agent', 'Jonah ' . $GLOBALS['registry']->getVersion());
 
     /* If a note has been provided, add it to the message as a text part. */
     if (strlen($note) > 0) {
@@ -40,10 +39,12 @@ function _mail($story_part, $from, $recipients, $subject, $note)
     return $mail->send(Horde::getMailerConfig());
 }
 
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
 require_once dirname(__FILE__) . '/../lib/Application.php';
-$jonah = Horde_Registry::appInit('jonah');
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none',
+    'session_control' => 'readonly'
+));
+
 require_once 'Horde/Form.php';
 require_once 'Horde/Form/Renderer.php';
 
index c2546c4..176926b 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 /**
- * $Horde: jonah/stories/view.php,v 1.57 2009/12/10 17:42:36 jan Exp $
- *
  * Copyright 2003-2009 The Horde Project (http://www.horde.org/)
  *
  * See the enclosed file LICENSE for license information (BSD). If you
  * @author Chuck Hagenbuch <chuck@horde.org>
  */
 
-@define('AUTH_HANDLER', true);
-@define('JONAH_BASE', dirname(__FILE__) . '/..');
 require_once dirname(__FILE__) . '/../lib/Application.php';
-$jonah = Horde_Registry::appInit('jonah');
+$jonah = Horde_Registry::appInit('jonah', array(
+    'authentication' => 'none'
+));
 
 $news = Jonah_News::factory();
 
index 1777eea..d866877 100644 (file)
@@ -5,9 +5,6 @@ if (isset($language)) {
 }
 ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
-<!-- Jonah: Copyright 1999-2009 The Horde Project.  Jonah is under a Horde license. -->
-<!--   Horde Project: http://www.horde.org/ | Jonah: http://www.horde.org/jonah/    -->
-<!--               Horde Licenses: http://www.horde.org/licenses/                   -->
 <?php echo !empty($language) ? '<html lang="' . strtr($language, '_', '-') . '">' : '<html>' ?>
 <head>
 <?php
diff --git a/jonah/test.php b/jonah/test.php
deleted file mode 100644 (file)
index 54b841a..0000000
+++ /dev/null
@@ -1,74 +0,0 @@
-<?php
-/**
- * $Horde: jonah/test.php,v 1.30 2009/11/11 01:30:59 mrubinsk Exp $
- *
- * Copyright 1999-2009 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.
- */
-
-/* Include Horde's core.php file. */
-include_once '../lib/core.php';
-
-/* We should have loaded the String class, from the Horde_Util
- * package, in core.php. If Horde_String:: isn't defined, then we're not
- * finding some critical libraries. */
-if (!class_exists('Horde_String')) {
-    echo '<br /><h2 style="color:red">The Horde_Util package was not found. If PHP\'s error_reporting setting is high enough and display_errors is on, there should be error messages printed above that may help you in debugging the problem. If you are simply missing these files, then you need to get the <a href="http://cvs.horde.org/cvs.php/framework">framework</a> module from <a href="http://www.horde.org/source/">Horde CVS</a>, and install the packages in it with the install-packages.php script.</h2>';
-    exit;
-}
-
-/* Initialize the Horde_Test:: class. */
-if (!is_readable('../lib/Test.php')) {
-    echo 'ERROR: You must install Horde before running this script.';
-    exit;
-}
-require_once '../lib/Test.php';
-$horde_test = new Horde_Test();
-
-/* Jonah definitions. */
-$module = 'Jonah';
-require_once dirname(__FILE__) . '/lib/Application.php';
-$app = new Jonah_Application();
-$module_version = $app->version;
-
-
-/* PHP module capabilities. */
-$module_list = array(
-    'gettext'  =>  array(
-        'descrip' => 'Gettext Support',
-        'error' => 'Jonah will not run without gettext support. Compile php <code>--with-gettext</code> before continuing.'
-    ),
-    'xml'  =>  array(
-        'descrip' => 'XML Support',
-        'error' => 'Without XML support, Jonah WILL NOT WORK. You must fix this before going any further.'
-    )
-);
-
-/* Jonah configuration files. */
-$file_list = array(
-    'config/conf.php' => 'The file <code>./config/conf.php</code> appears to be missing. You probably just forgot to copy <code>./config/conf.php.dist</code> over. While you do that, take a look at the settings and make sure they are appropriate for your site.'
-);
-
-require TEST_TEMPLATES . 'header.inc';
-require TEST_TEMPLATES . 'version.inc';
-
-/* Display PHP Version information. */
-$php_info = $horde_test->getPhpVersionInformation();
-require TEST_TEMPLATES . 'php_version.inc';
-
-?>
-
-<h1>PHP Modules</h1>
-<ul>
-    <?php echo $horde_test->phpModuleCheck($module_list) ?>
-</ul>
-
-<h1>Jonah Configuration Files</h1>
-<ul>
-    <?php echo $horde_test->requiredFileCheck($file_list) ?>
-</ul>
-
-<?php
-require TEST_TEMPLATES . 'footer.inc';
index c3d885d..f792fb1 100644 (file)
@@ -1,7 +1,3 @@
-/**
- * $Horde: jonah/themes/screen.css,v 1.9 2008/05/26 21:33:11 chuck Exp $
- */
-
 .storySubtitle {
     font-style: italic;
     font-size: 90%;