--- /dev/null
+<?php
+/**
+ * Script to determine the correct *_BASE values.
+ *
+ * Copyright 2009 The Horde Project (http://www.horde.org/)
+ *
+ * See the enclosed file COPYING for license information (GPL). If you
+ * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
+ *
+ * @package Turba
+ */
+
+$curr_dir = dirname(__FILE__);
+
+if (!defined('HORDE_BASE')) {
+ /* Temporary fix - if horde does not live directly under the app
+ * directory, the HORDE_BASE constant should be defined in
+ * lib/base.local.php. */
+ if (file_exists($curr_dir . '/base.local.php')) {
+ include $curr_dir . '/base.local.php';
+ } else {
+ define('HORDE_BASE', $curr_dir . '/../..');
+ }
+}
+
+if (!defined('ANSEL_BASE')) {
+ define('ANSEL_BASE', $curr_dir . '/..');
+}
* @package Ansel
*/
-// Check for a prior definition of HORDE_BASE (perhaps by an
-// auto_prepend_file definition for site customization).
-if (!defined('HORDE_BASE')) {
- define('HORDE_BASE', dirname(__FILE__) . '/../..');
-}
+// Determine BASE directories.
+require_once dirname(__FILE__) . '/base.load.php';
// Load the Horde Framework core, and set up inclusion paths.
require_once HORDE_BASE . '/lib/core.php';
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('ansel', $e);
}
-
-$conf = &$GLOBALS['conf'];
-if (!defined('ANSEL_TEMPLATES')) {
- define('ANSEL_TEMPLATES', $registry->get('templates'));
-}
+$conf = $GLOBALS['conf'];
+define('ANSEL_TEMPLATES', $registry->get('templates'));
// Notification system.
$GLOBALS['notification'] = Horde_Notification::singleton();
$GLOBALS['notification']->attach('status');
-// Find the base file path of Ansel.
-if (!defined('ANSEL_BASE')) {
- define('ANSEL_BASE', dirname(__FILE__) . '/..');
-}
-
// Ansel base libraries.
require_once ANSEL_BASE . '/lib/Ansel.php';