From 498f784228ce2258e5752ea5f65caaa722790f1d Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 29 Jul 2009 14:39:10 -0600 Subject: [PATCH] Remove Horde_Test::configFilesMissing() tests. --- ansel/index.php | 17 +---------------- chora/index.php | 15 +-------------- crumb/index.php | 11 +---------- fima/index.php | 12 +----------- folks/index.php | 12 +----------- gollem/index.php | 16 +--------------- imp/index.php | 15 +-------------- ingo/index.php | 15 +-------------- jeta/index.php | 11 +---------- kastalia/index.php | 12 +----------- kronolith/index.php | 10 ---------- nag/index.php | 12 +----------- news/index.php | 10 ---------- skeleton/index.php | 12 +----------- skoli/index.php | 16 +--------------- turba/index.php | 16 +--------------- 16 files changed, 14 insertions(+), 198 deletions(-) diff --git a/ansel/index.php b/ansel/index.php index 1cdffd00d..dd665b930 100644 --- a/ansel/index.php +++ b/ansel/index.php @@ -1,7 +1,5 @@ */ -define('ANSEL_BASE', dirname(__FILE__)); -$ansel_configured = (is_readable(ANSEL_BASE . '/config/conf.php') && - is_readable(ANSEL_BASE . '/config/prefs.php') && - is_readable(ANSEL_BASE . '/config/styles.php')); - -if (!$ansel_configured) { - require ANSEL_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Ansel', ANSEL_BASE, - array('conf.php', 'prefs.php'), - array('styles.php' => 'This file controls the available gallery styles for Ansel.')); -} - -require_once ANSEL_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; header('Location: ' . Ansel::getUrlFor('default_view', array())); -exit; diff --git a/chora/index.php b/chora/index.php index 5ccfb14a8..0362bde97 100644 --- a/chora/index.php +++ b/chora/index.php @@ -9,17 +9,4 @@ * @package Chora */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$chora_configured = (is_readable(CHORA_BASE . '/config/conf.php') && - is_readable(CHORA_BASE . '/config/sourceroots.php') && - is_readable(CHORA_BASE . '/config/mime_drivers.php') && - is_readable(CHORA_BASE . '/config/prefs.php')); - -if (!$chora_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Chora', CHORA_BASE, - array('conf.php', 'prefs.php', 'mime_drivers.php'), - array('sourceroots.php' => 'This file defines all of the source repositories that you wish Chora to display.')); -} - -require CHORA_BASE . '/browsedir.php'; +require dirname(__FILE__) . '/browsedir.php'; diff --git a/crumb/index.php b/crumb/index.php index 7c4be2557..f82ef6f7c 100644 --- a/crumb/index.php +++ b/crumb/index.php @@ -10,13 +10,4 @@ * @author Ben Klang */ -@define('CRUMB_BASE', dirname(__FILE__)); -$crumb_configured = (is_readable(CRUMB_BASE . '/config/conf.php')); - -if (!$crumb_configured) { - require CRUMB_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Crumb', CRUMB_BASE, - array('conf.php')); -} - -require CRUMB_BASE . '/listclients.php'; +require dirname(__FILE__) . '/listclients.php'; diff --git a/fima/index.php b/fima/index.php index 9bc17c539..958e664da 100644 --- a/fima/index.php +++ b/fima/index.php @@ -10,14 +10,4 @@ * @author Thomas Trethan */ -@define('FIMA_BASE', dirname(__FILE__)); -$fima_configured = (is_readable(FIMA_BASE . '/config/conf.php') && - is_readable(FIMA_BASE . '/config/prefs.php')); - -if (!$fima_configured) { - require FIMA_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Fima', FIMA_BASE, - array('conf.php', 'prefs.php')); -} - -require FIMA_BASE . '/postings.php'; +require dirname(__FILE__) . '/postings.php'; diff --git a/folks/index.php b/folks/index.php index 6080b7b0d..0916600de 100644 --- a/folks/index.php +++ b/folks/index.php @@ -10,14 +10,4 @@ * @author Duck */ -define('FOLKS_BASE', dirname(__FILE__)); -$folks_configured = (is_readable(FOLKS_BASE . '/config/conf.php') && - is_readable(FOLKS_BASE . '/config/prefs.php')); - -if (!$folks_configured) { - require FOLKS_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Folks', FOLKS_BASE, - array('conf.php', 'prefs.php')); -} - -require FOLKS_BASE . '/list.php'; \ No newline at end of file +require dirname(__FILE__) . '/list.php'; diff --git a/gollem/index.php b/gollem/index.php index d66c255ff..a47508014 100644 --- a/gollem/index.php +++ b/gollem/index.php @@ -12,18 +12,4 @@ * @package Gollem */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$gollem_configured = (is_readable(GOLLEM_BASE . '/config/backends.php') && - is_readable(GOLLEM_BASE . '/config/conf.php') && - is_readable(GOLLEM_BASE . '/config/credentials.php') && - is_readable(GOLLEM_BASE . '/config/mime_drivers.php') && - is_readable(GOLLEM_BASE . '/config/prefs.php')); - -if (!$gollem_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Gollem', GOLLEM_BASE, - array('conf.php', 'mime_drivers.php', 'prefs.php', 'backends.php'), - array('credentials.php' => 'This file defines types of credentials that a backend might request.')); -} - -require GOLLEM_BASE . '/manager.php'; +require dirname(__FILE__) . '/manager.php'; diff --git a/imp/index.php b/imp/index.php index 1b9e37b22..9b7bd2d8c 100644 --- a/imp/index.php +++ b/imp/index.php @@ -9,21 +9,8 @@ * @package IMP */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$imp_configured = (is_readable(IMP_BASE . '/config/conf.php') && - is_readable(IMP_BASE . '/config/mime_drivers.php') && - is_readable(IMP_BASE . '/config/prefs.php') && - is_readable(IMP_BASE . '/config/servers.php')); - -if (!$imp_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('IMP', IMP_BASE, - array('conf.php', 'mime_drivers.php', 'prefs.php'), - array('servers.php' => 'This file controls the default settings for IMP, and also defines the list of available servers if you are using the server list.')); -} - // Will redirect to login page if not authenticated. -require_once IMP_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; // Load initial page as defined by view mode & preferences. require IMP_Auth::getInitialPage(); diff --git a/ingo/index.php b/ingo/index.php index 111dce32b..bfbb0ba02 100644 --- a/ingo/index.php +++ b/ingo/index.php @@ -10,17 +10,4 @@ * @author Mike Cochrane */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$ingo_configured = (is_readable(INGO_BASE . '/config/conf.php') && - is_readable(INGO_BASE . '/config/prefs.php') && - is_readable(INGO_BASE . '/config/backends.php') && - is_readable(INGO_BASE . '/config/fields.php')); - -if (!$ingo_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Ingo', INGO_BASE, - array('conf.php', 'prefs.php', 'backends.php'), - array('fields.php' => 'This file defines types of credentials that a backend might request.')); -} - -require INGO_BASE . '/filters.php'; +require dirname(__FILE__) . '/filters.php'; diff --git a/jeta/index.php b/jeta/index.php index 50c8c5622..42cc89e42 100644 --- a/jeta/index.php +++ b/jeta/index.php @@ -8,13 +8,4 @@ * @author Eric Rostetter */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$jeta_configured = (is_readable(JETA_BASE . '/config/conf.php') && - is_readable(JETA_BASE . '/config/prefs.php')); - -if (!$jeta_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Jeta', JETA_BASE, array('conf.php')); -} - -require JETA_BASE . '/main.php'; +require dirname(__FILE__) . '/main.php'; diff --git a/kastalia/index.php b/kastalia/index.php index 2a9e0acfc..4f6f4dc10 100755 --- a/kastalia/index.php +++ b/kastalia/index.php @@ -1,6 +1,5 @@ */ -@define('KASTALIA_BASE', dirname(__FILE__)); -$kastalia_configured = (is_readable(KASTALIA_BASE . '/config/conf.php')); - -if (!$kastalia_configured) { - require KASTALIA_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('Kastalia', KASTALIA_BASE, - array('conf.php')); -} - -require KASTALIA_BASE . '/list.php'; +require dirname(__FILE__) . '/list.php'; require KASTALIA_BASE . '/main.php'; diff --git a/kronolith/index.php b/kronolith/index.php index bdeec7467..df4512ed8 100644 --- a/kronolith/index.php +++ b/kronolith/index.php @@ -6,16 +6,6 @@ * not receive such a file, see also http://www.fsf.org/copyleft/gpl.html. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$kronolith_configured = (is_readable(KRONOLITH_BASE . '/config/conf.php') && - is_readable(KRONOLITH_BASE . '/config/prefs.php')); - -if (!$kronolith_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Kronolith', KRONOLITH_BASE, - array('conf.php', 'prefs.php')); -} - require_once KRONOLITH_BASE . '/lib/base.php'; /* Load traditional interface? */ diff --git a/nag/index.php b/nag/index.php index 0b44c6002..0e80255b6 100644 --- a/nag/index.php +++ b/nag/index.php @@ -8,14 +8,4 @@ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html. */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$nag_configured = (is_readable(NAG_BASE . '/config/conf.php') && - is_readable(NAG_BASE . '/config/prefs.php')); - -if (!$nag_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Nag', NAG_BASE, - array('conf.php', 'prefs.php')); -} - -require NAG_BASE . '/list.php'; +require dirname(__FILE__) . '/list.php'; diff --git a/news/index.php b/news/index.php index 7b34d04d5..1fe4f72c8 100644 --- a/news/index.php +++ b/news/index.php @@ -11,14 +11,4 @@ * @package News */ -define('NEWS_BASE', dirname(__FILE__)); -$news_configured = (is_readable(NEWS_BASE . '/config/conf.php') && - is_readable(NEWS_BASE . '/config/prefs.php')); - -if (!$news_configured) { - require NEWS_BASE . '/../lib/Test.php'; - Horde_Test::configFilesMissing('news', NEWS_BASE, - array('conf.php', 'prefs.php', 'sources.php')); -} - require NEWS_BASE . '/content.php'; diff --git a/skeleton/index.php b/skeleton/index.php index ec042cf9d..b85bece23 100644 --- a/skeleton/index.php +++ b/skeleton/index.php @@ -10,14 +10,4 @@ * @author Your Name */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$skeleton_configured = (is_readable(SKELETON_BASE . '/config/conf.php') && - is_readable(SKELETON_BASE . '/config/prefs.php')); - -if (!$skeleton_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Skeleton', SKELETON_BASE, - array('conf.php', 'prefs.php')); -} - -require SKELETON_BASE . '/list.php'; +require dirname(__FILE__) . '/list.php'; diff --git a/skoli/index.php b/skoli/index.php index fe0a3ae79..c5a7d4085 100644 --- a/skoli/index.php +++ b/skoli/index.php @@ -1,24 +1,10 @@ _('This file defines templates for new classes.'))); -} - -require_once SKOLI_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; require SKOLI_BASE . '/' . $prefs->getValue('initial_page') . '.php'; diff --git a/turba/index.php b/turba/index.php index 20566c700..ef41f383d 100644 --- a/turba/index.php +++ b/turba/index.php @@ -10,21 +10,7 @@ * @author Chuck Hagenbuch */ -require_once dirname(__FILE__) . '/lib/base.load.php'; -$turba_configured = (is_readable(TURBA_BASE . '/config/conf.php') && - is_readable(TURBA_BASE . '/config/attributes.php') && - is_readable(TURBA_BASE . '/config/prefs.php') && - is_readable(TURBA_BASE . '/config/mime_drivers.php') && - is_readable(TURBA_BASE . '/config/sources.php')); - -if (!$turba_configured) { - require HORDE_BASE . '/lib/Test.php'; - Horde_Test::configFilesMissing('Turba', TURBA_BASE, - array('conf.php', 'prefs.php', 'mime_drivers.php', 'sources.php'), - array('attributes.php' => 'This file defines the Turba global attribute names and types - names, email addresses, etc.')); -} - -require_once TURBA_BASE . '/lib/base.php'; +require_once dirname(__FILE__) . '/lib/base.php'; require TURBA_BASE . '/' . ($browse_source_count ? basename($prefs->getValue('initial_page')) : 'search.php'); -- 2.11.0