* @package Chora
*/
-define('CHORA_BASE', dirname(__FILE__));
+require_once dirname(__FILE__) . '/lib/base.load.php';
$chora_configured = (is_readable(CHORA_BASE . '/config/conf.php') &&
is_readable(CHORA_BASE . '/config/sourceroots.php') &&
is_readable(CHORA_BASE . '/config/mime_drivers.php') &&
is_readable(CHORA_BASE . '/config/prefs.php'));
if (!$chora_configured) {
- /* Chora isn't configured. */
- require CHORA_BASE . '/../lib/Test.php';
+ require HORDE_BASE . '/lib/Test.php';
Horde_Test::configFilesMissing('Chora', CHORA_BASE,
array('conf.php', 'prefs.php', 'mime_drivers.php'),
array('sourceroots.php' => 'This file defines all of the source repositories that you wish Chora to display.'));
--- /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 Chora
+ */
+
+$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('CHORA_BASE')) {
+ define('CHORA_BASE', $curr_dir . '/..');
+}
*/
/* Include Horde's core.php file. */
-$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 . '/..');
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
/* Chora version. */
$module = 'Chora';
-require_once $filedir . '/lib/version.php';
+require_once CHORA_BASE . '/lib/version.php';
$module_version = CHORA_VERSION;
/* Chora configuration files. */
}
// Need to load Util:: to give us access to Util::getPathInfo().
-$imp_dir = dirname(__FILE__);
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists($imp_dir . '/lib/base.local.php')) {
- include $imp_dir . '/lib/base.local.php';
- } else {
- define('HORDE_BASE', $imp_dir . '/..');
- }
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
$action = basename(Util::getPathInfo());
if (empty($action)) {
$dimp_logout = ($action == 'LogOut');
$session_timeout = 'json';
-require_once $imp_dir . '/lib/base.php';
+require_once IMP_BASE . '/lib/base.php';
// Process common request variables.
$mbox = Util::getPost('view');
$expire_time = 525600;
/* Load IMP.php to access IMP::getPathInfo(). */
-$imp_dir = dirname(__FILE__);
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists($imp_dir . '/lib/base.local.php')) {
- include $imp_dir . '/lib/base.local.php';
- } else {
- define('HORDE_BASE', $imp_dir . '/..');
- }
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
$path_info = trim(Util::getPathInfo(), '/');
if (empty($path_info)) {
}
$session_control = 'readonly';
$session_timeout = 'none';
-require_once $imp_dir . '/lib/base.php';
+require_once IMP_BASE . '/lib/base.php';
switch ($type) {
case 'css':
* @package IMP
*/
-@define('IMP_BASE', dirname(__FILE__));
+require_once dirname(__FILE__) . '/lib/base.load.php';
$imp_configured = (is_readable(IMP_BASE . '/config/conf.php') &&
is_readable(IMP_BASE . '/config/mime_drivers.php') &&
is_readable(IMP_BASE . '/config/prefs.php') &&
is_readable(IMP_BASE . '/config/servers.php'));
if (!$imp_configured) {
- if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists(IMP_BASE . '/lib/base.local.php')) {
- include IMP_BASE . '/lib/base.local.php';
- } else {
- define('HORDE_BASE', IMP_BASE . '/..');
- }
- }
-
require HORDE_BASE . '/lib/Test.php';
Horde_Test::configFilesMissing('IMP', IMP_BASE,
array('conf.php', 'mime_drivers.php', 'prefs.php'),
--- /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 IMP
+ */
+
+$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('IMP_BASE')) {
+ define('IMP_BASE', $curr_dir . '/..');
+}
* @package IMP
*/
+// Determine BASE directories.
$imp_dir = dirname(__FILE__);
-
-// Check for a prior definition of HORDE_BASE.
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists($imp_dir . '/base.local.php')) {
- include $imp_dir . '/base.local.php';
- } else {
- define('HORDE_BASE', $imp_dir . '/../..');
- }
-}
-
-// Find the base file path of IMP.
-if (!defined('IMP_BASE')) {
- define('IMP_BASE', $imp_dir . '/..');
-}
+require_once $imp_dir . '/base.load.php';
// Load the Horde Framework core, and set up inclusion paths.
require_once HORDE_BASE . '/lib/core.php';
/* Include Horde's core.php file. */
-$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 . '/..');
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
/* IMP version. */
$module = 'IMP';
-require_once $filedir .'/lib/version.php';
+require_once IMP_BASE .'/lib/version.php';
$module_version = IMP_VERSION;
require TEST_TEMPLATES . 'header.inc';
* @author Mike Cochrane <mike@graftonhall.co.nz>
*/
-@define('INGO_BASE', dirname(__FILE__));
+require_once dirname(__FILE__) . '/base.load.php';
$ingo_configured = (is_readable(INGO_BASE . '/config/conf.php') &&
is_readable(INGO_BASE . '/config/prefs.php') &&
is_readable(INGO_BASE . '/config/backends.php') &&
is_readable(INGO_BASE . '/config/fields.php'));
if (!$ingo_configured) {
- if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists(INGO_BASE . '/lib/base.local.php')) {
- include INGO_BASE . '/lib/base.local.php';
- } else {
- define('HORDE_BASE', INGO_BASE . '/..');
- }
- }
-
require HORDE_BASE . '/lib/Test.php';
Horde_Test::configFilesMissing('Ingo', INGO_BASE,
array('conf.php', 'prefs.php', 'backends.php'),
--- /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 Ingo
+ */
+
+$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('INGO_BASE')) {
+ define('INGO_BASE', $curr_dir . '/..');
+}
* did not receive this file, see http://www.horde.org/licenses/asl.php.
*/
+// Determine BASE directories.
$ingo_dir = dirname(__FILE__);
-
-// Check for a prior definition of HORDE_BASE.
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists($ingo_dir . '/base.local.php')) {
- include $ingo_dir . '/base.local.php';
- } else {
- define('HORDE_BASE', $ingo_dir . '/../..');
- }
-}
-
-// Find the base file path of Ingo.
-if (!defined('INGO_BASE')) {
- define('INGO_BASE', $ingo_dir . '/..');
-}
+require_once $ingo_dir . '/base.load.php';
// Load the Horde Framework core, and set up inclusion paths.
require_once HORDE_BASE . '/lib/core.php';
*/
/* Include Horde's core.php file. */
-$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 . '/..');
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util
/* Ingo version. */
$module = 'Ingo';
-require_once $filedir . '/lib/version.php';
+require_once INGO_BASE . '/lib/version.php';
$module_version = INGO_VERSION;
require TEST_TEMPLATES . 'header.inc';
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
if (!Util::getFormData('cancel')) {
$targetcalendar = Util::getFormData('targetcalendar');
}
// Need to load Util:: to give us access to Util::getPathInfo().
-$kronolith_dir = dirname(__FILE__);
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the kronolith
- * directory, the HORDE_BASE constant should be defined in
- * kronolith/lib/base.local.php. */
- if (file_exists($kronolith_dir . '/lib/base.local.php')) {
- include $kronolith_dir . '/lib/base.local.php';
- } else {
- define('HORDE_BASE', $kronolith_dir . '/..');
- }
-}
+require_once dirname(__FILE__) . '/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
$action = basename(Util::getPathInfo());
if (empty($action)) {
}
$session_timeout = 'json';
-require_once $kronolith_dir . '/lib/base.php';
+require_once KRONOLITH_BASE . '/lib/base.php';
// Process common request variables.
$cacheid = Util::getPost('cacheid');
*/
@define('AUTH_HANDLER', true);
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$cal = Util::getFormData('c');
$id = Util::getFormData('e');
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
require_once 'Horde/Identity.php';
require_once 'Horde/Variables.php';
* did not receive this file, see http://www.fsf.org/copyleft/gpl.html.
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
if (!Auth::getAuth()) {
Util::closeWindowJS();
return Horde_Data::IMPORT_FILE;
}
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
if (!$conf['menu']['import_export']) {
require KRONOLITH_BASE . '/index.php';
* @package Kronolith
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$kronolith_driver = Kronolith::getDriver(null, Util::getFormData('calendar'));
if ($eventID = Util::getFormData('eventID')) {
return true;
}
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$url = Util::getFormData('url');
$kronolith_driver = Kronolith::getDriver();
* @package Kronolith
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$viewName = Util::getFormData('view', 'Event');
$view = Kronolith::getView($viewName);
*/
@define('AUTH_HANDLER', true);
-@define('KRONOLITH_BASE', dirname(__FILE__));
$session_control = 'none';
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
// We want to always generate UTF-8 iCalendar data.
NLS::setCharset('UTF-8');
* @author Michael Slusarz <slusarz@horde.org>
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
$path = Util::getFormData('imple');
if (!$path) {
* not receive such a file, see also http://www.fsf.org/copyleft/gpl.html.
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
+require_once dirname(__FILE__) . '/lib/base.load.php';
$kronolith_configured = (is_readable(KRONOLITH_BASE . '/config/conf.php') &&
is_readable(KRONOLITH_BASE . '/config/prefs.php'));
if (!$kronolith_configured) {
- require KRONOLITH_BASE . '/../lib/Test.php';
+ require HORDE_BASE . '/lib/Test.php';
Horde_Test::configFilesMissing('Kronolith', KRONOLITH_BASE,
array('conf.php', 'prefs.php'));
}
--- /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 Kronolith
+ */
+
+$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('KRONOLITH_BASE')) {
+ define('KRONOLITH_BASE', $curr_dir . '/..');
+}
* @package Kronolith
*/
+// Determine BASE directories.
$kronolith_dir = dirname(__FILE__);
+require_once $kronolith_dir . '/base.load.php';
-// Check for a prior definition of HORDE_BASE.
-if (!defined('HORDE_BASE')) {
- /* Temporary fix - if horde does not live directly under the imp
- * directory, the HORDE_BASE constant should be defined in
- * imp/lib/base.local.php. */
- if (file_exists($kronolith_dir . '/base.local.php')) {
- include $kronolith_dir . '/base.local.php';
- } else {
- define('HORDE_BASE', $kronolith_dir . '/../..');
- }
-}
/* Load the Horde Framework core, and set up inclusion paths. */
require_once HORDE_BASE . '/lib/core.php';
Horde_Autoloader::addClassPath($kronolith_dir);
$conf = &$GLOBALS['conf'];
define('KRONOLITH_TEMPLATES', $registry->get('templates'));
-/* Find the base file path of Kronolith. */
-if (!defined('KRONOLITH_BASE')) {
- define('KRONOLITH_BASE', $kronolith_dir . '/..');
-}
-
/* Horde framework libraries. */
require_once 'Horde/Help.php';
* @author Chuck Hagenbuch <chuck@horde.org>
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require KRONOLITH_BASE . '/lib/base.php';
+require dirname(__FILE__) . '/lib/base.php';
/* Check permissions. */
if (Kronolith::hasPermission('max_events') !== true &&
* @author Jan Schneider <jan@horde.org>
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
require_once 'Horde/Group.php';
$shares = &Horde_Share::singleton('kronolith');
* @author Chuck Hagenbuch <chuck@horde.org>
*/
-@define('HORDE_BASE', dirname(dirname(__FILE__)));
+require_once dirname(__FILE__) . '/lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
$registry = &Registry::singleton();
* @author Meilof Veeningen <meilof@gmail.com>
*/
-@define('KRONOLITH_BASE', dirname(__FILE__));
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/lib/base.php';
/* Get search parameters. */
$search_mode = Util::getFormData('search_mode', 'basic');
<?php
/* Include Horde's core.php file. */
-$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 . '/..');
-}
+require_once dirname(__FILE__) . '/lib/base.load.php';
include_once HORDE_BASE . '/lib/core.php';
/* We should have loaded the String class, from the Horde_Util package, in
$horde_test = new Horde_Test;
$module = 'Kronolith';
-require_once $filedir . '/lib/version.php';
+require_once KRONOLITH_DIR . '/lib/version.php';
$module_version = KRONOLITH_VERSION;
require TEST_TEMPLATES . 'header.inc';