Some H4 goodness to define HORDE_BASE etc...
authorMichael Rubinsky <mrubinsk@simon.horde.org>
Thu, 24 Dec 2009 20:18:40 +0000 (20:18 +0000)
committerMichael Rubinsky <mrubinsk@simon.horde.org>
Thu, 24 Dec 2009 20:18:40 +0000 (20:18 +0000)
wicked/lib/base.load.php [new file with mode: 0644]
wicked/lib/base.php

diff --git a/wicked/lib/base.load.php b/wicked/lib/base.load.php
new file mode 100644 (file)
index 0000000..0fba782
--- /dev/null
@@ -0,0 +1,25 @@
+<?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 Ansel
+ */
+
+if (!defined('WICKED_BASE')) {
+    define('WICKED_BASE', dirname(__FILE__) . '/..');
+}
+
+if (!defined('HORDE_BASE')) {
+    /* If horde does not live directly under the app directory, the HORDE_BASE
+     * constant should be defined in config/horde.local.php. */
+    if (file_exists(WICKED_BASE . '/config/horde.local.php')) {
+        include WICKED_BASE . '/config/horde.local.php';
+    } else {
+        define('HORDE_BASE', WHUPS_BASE . '/..');
+    }
+}
index d1f36e6..f79f8c9 100644 (file)
  * did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
  */
 
-// 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';