*/
/* Include Horde's core.php file. */
-include_once '../lib/core.php';
+$filedir = dirname(__FILE__);
+if (file_exists($filedir . '/lib/base.local.php')) {
+ include_once $filedir . '/lib/base.local.php';
+} elseif (!defined('HORDE_BASE')) {
+ define('HORDE_BASE', $filedir . '/..');
+}
+include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
package, in core.php. If String:: isn't defined, then we're not
}
/* Initialize the Horde_Test:: class. */
-if (!is_readable('../lib/Test.php')) {
+if (!is_readable(HORDE_BASE . '/lib/Test.php')) {
echo 'ERROR: You must install Horde before running this script.';
exit;
}
-require_once '../lib/Test.php';
+require_once HORDE_BASE . '/lib/Test.php';
$horde_test = new Horde_Test;
/* Chora version. */
$module = 'Chora';
-require_once './lib/version.php';
+require_once $filedir . '/lib/version.php';
$module_version = CHORA_VERSION;
/* Chora configuration files. */
function _doConnectionTest()
{
- require_once 'Horde/Imap/Client.php';
$imap_config = array(
'username' => isset($_POST['user']) ? $_POST['user'] : '',
'password' => isset($_POST['passwd']) ? $_POST['passwd'] : '',
/* Include Horde's core.php file. */
-include_once '../lib/core.php';
+$filedir = dirname(__FILE__);
+if (file_exists($filedir . '/lib/base.local.php')) {
+ include_once $filedir . '/lib/base.local.php';
+} elseif (!defined('HORDE_BASE')) {
+ define('HORDE_BASE', $filedir . '/..');
+}
+include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
* package, in core.php. If String:: isn't defined, then we're not
}
/* Initialize the Horde_Test:: class. */
-if (!is_readable('../lib/Test.php')) {
+if (!is_readable(HORDE_BASE . '/lib/Test.php')) {
echo 'ERROR: You must install Horde before running this script.';
exit;
}
-require_once '../lib/Test.php';
+
+require_once HORDE_BASE . '/lib/Test.php';
$horde_test = new Horde_Test;
/* IMP version. */
$module = 'IMP';
-require_once './lib/version.php';
+require_once $filedir .'/lib/version.php';
$module_version = IMP_VERSION;
require TEST_TEMPLATES . 'header.inc';
*/
/* Include Horde's core.php file. */
-include_once '../lib/core.php';
+$filedir = dirname(__FILE__);
+if (file_exists($filedir . '/lib/base.local.php')) {
+ include_once $filedir . '/lib/base.local.php';
+} elseif (!defined('HORDE_BASE')) {
+ define('HORDE_BASE', $filedir . '/..');
+}
+include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
* package, in core.php. If String:: isn't defined, then we're not
}
/* Initialize the Horde_Test:: class. */
-if (!is_readable('../lib/Test.php')) {
+if (!is_readable(HORDE_BASE . '/lib/Test.php')) {
echo 'ERROR: You must install Horde before running this script.';
exit;
}
-require_once '../lib/Test.php';
+require_once HORDE_BASE . '/lib/Test.php';
$horde_test = new Horde_Test;
/* Ingo version. */
$module = 'Ingo';
-require_once './lib/version.php';
+require_once $filedir . '/lib/version.php';
$module_version = INGO_VERSION;
require TEST_TEMPLATES . 'header.inc';
<?php
/* Include Horde's core.php file. */
-include_once '../lib/core.php';
+$filedir = dirname(__FILE__);
+if (file_exists($filedir . '/lib/base.local.php')) {
+ include_once $filedir . '/lib/base.local.php';
+} elseif (!defined('HORDE_BASE')) {
+ define('HORDE_BASE', $filedir . '/..');
+}
+include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util package, in
* core.php. If String:: isn't defined, then we're not finding some critical
}
/* Initialize the Horde_Test:: class. */
-if (!is_readable('../lib/Test.php')) {
+if (!is_readable(HORDE_BASE . '/lib/Test.php')) {
echo 'ERROR: You must install Horde before running this script.';
exit;
}
-require_once '../lib/Test.php';
+require_once HORDE_BASE . '/lib/Test.php';
$horde_test = new Horde_Test;
-
$module = 'Kronolith';
-require_once './lib/version.php';
+require_once $filedir . '/lib/version.php';
$module_version = KRONOLITH_VERSION;
require TEST_TEMPLATES . 'header.inc';