add some H4 goodness, and hope this gets bugs.horde.org working again :)
authorMichael Rubinsky <mrubinsk@simon.horde.org>
Thu, 24 Dec 2009 18:58:57 +0000 (18:58 +0000)
committerMichael Rubinsky <mrubinsk@simon.horde.org>
Thu, 24 Dec 2009 18:58:57 +0000 (18:58 +0000)
whups/index.php
whups/lib/base.load.php [new file with mode: 0644]
whups/lib/base.php

index a1e0dd4..e35d6c6 100644 (file)
@@ -7,7 +7,8 @@
  * did not receive this file, see http://www.horde.org/licenses/bsdl.php.
  */
 
-define('WHUPS_BASE', dirname(__FILE__));
+// Determine BASE directories.
+require_once dirname(__FILE__) . '/lib/base.load.php';
 $whups_configured = (is_readable(WHUPS_BASE . '/config/conf.php') &&
                      is_readable(WHUPS_BASE . '/config/create_email.txt') &&
                      is_readable(WHUPS_BASE . '/config/mime_drivers.php') &&
diff --git a/whups/lib/base.load.php b/whups/lib/base.load.php
new file mode 100644 (file)
index 0000000..7263da3
--- /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('WHUPS_BASE')) {
+    define('WHUPS__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(WHUPS_BASE . '/config/horde.local.php')) {
+        include WHUPS_BASE . '/config/horde.local.php';
+    } else {
+        define('HORDE_BASE', WHUPS_BASE . '/..');
+    }
+}
index e4a1990..dbca6da 100644 (file)
  * @package Whups
  */
 
-// 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';