* Add similar base.local.php support to kronolith, and update
authorMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 16 Jan 2009 19:42:20 +0000 (14:42 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Fri, 16 Jan 2009 19:45:30 +0000 (14:45 -0500)
gitignore to catch these files in any application.

.gitignore
kronolith/lib/base.php

index ff5246f..68d5e09 100644 (file)
@@ -6,4 +6,4 @@ libs
 .settings
 *~
 .#*
-imp/lib/base.local.php
+*/lib/base.local.php
index f7f60a9..fa6ea0e 100644 (file)
  * @package Kronolith
  */
 
-/* Check for a prior definition of HORDE_BASE (perhaps by an auto_prepend_file
- * definition for site customization). */
+// Check for a prior definition of HORDE_BASE.
 if (!defined('HORDE_BASE')) {
-    define('HORDE_BASE', dirname(__FILE__) . '/../..');
+    /* 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. */
+    $krono_dir = dirname(__FILE__);
+    if (file_exists($krono_dir . '/base.local.php')) {
+        include $krono_dir . '/base.local.php';
+    } else {
+        define('HORDE_BASE', dirname(__FILE__) . '/../..');
+    }
 }
-
 /* Load the Horde Framework core, and set up inclusion paths. */
 require_once HORDE_BASE . '/lib/core.php';