From 462a2552e6014c7aa49bc1d1a78381387d6ab712 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Fri, 16 Jan 2009 14:42:20 -0500 Subject: [PATCH] * Add similar base.local.php support to kronolith, and update gitignore to catch these files in any application. --- .gitignore | 2 +- kronolith/lib/base.php | 14 ++++++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index ff5246f07..68d5e0910 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,4 @@ libs .settings *~ .#* -imp/lib/base.local.php +*/lib/base.local.php diff --git a/kronolith/lib/base.php b/kronolith/lib/base.php index f7f60a929..fa6ea0e41 100644 --- a/kronolith/lib/base.php +++ b/kronolith/lib/base.php @@ -14,12 +14,18 @@ * @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'; -- 2.11.0