From: Michael M Slusarz Date: Wed, 3 Jun 2009 02:52:05 +0000 (-0600) Subject: This script doesn't work with relative paths. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=563cc3da51446ec6431682bcef2c6cae099f9738;p=horde.git This script doesn't work with relative paths. --- 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.'));