This script doesn't work with relative paths.
authorMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Jun 2009 02:52:05 +0000 (20:52 -0600)
committerMichael M Slusarz <slusarz@curecanti.org>
Wed, 3 Jun 2009 02:52:05 +0000 (20:52 -0600)
imp/index.php

index 00235f8..068de14 100644 (file)
@@ -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.'));