add base.load.php and update version information
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Jul 2009 20:31:15 +0000 (16:31 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 30 Jul 2009 20:31:44 +0000 (16:31 -0400)
ansel/lib/base.load.php [new file with mode: 0644]
ansel/lib/base.php
ansel/lib/version.php

diff --git a/ansel/lib/base.load.php b/ansel/lib/base.load.php
new file mode 100644 (file)
index 0000000..f38bf4c
--- /dev/null
@@ -0,0 +1,28 @@
+<?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 . '/..');
+}
index 33de8f2..87ba99b 100644 (file)
  * @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';
@@ -30,21 +27,13 @@ try {
 } 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';
 
index 6c33e4c..4b58583 100755 (executable)
@@ -1 +1 @@
-<?php define('ANSEL_VERSION', '1.0-cvs') ?>
+<?php define('ANSEL_VERSION', '2.0-git') ?>