From 563cc3da51446ec6431682bcef2c6cae099f9738 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Tue, 2 Jun 2009 20:52:05 -0600 Subject: [PATCH] This script doesn't work with relative paths. --- imp/index.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/imp/index.php b/imp/index.php index 00235f84c..068de145c 100644 --- a/imp/index.php +++ b/imp/index.php @@ -16,7 +16,18 @@ $imp_configured = (is_readable(IMP_BASE . '/config/conf.php') && is_readable(IMP_BASE . '/config/servers.php')); if (!$imp_configured) { - require IMP_BASE . '/../lib/Test.php'; + if (!defined('HORDE_BASE')) { + /* Temporary fix - if horde does not live directly under the imp + * directory, the HORDE_BASE constant should be defined in + * imp/lib/base.local.php. */ + if (file_exists(IMP_BASE . '/lib/base.local.php')) { + include IMP_BASE . '/lib/base.local.php'; + } else { + define('HORDE_BASE', IMP_BASE . '/..'); + } + } + + 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.')); -- 2.11.0