When needed, replace with clearer/better $app_authentication variables.
While making the changes, clean up various Horde 4 conversion items.
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('babel', !defined('AUTH_HANDLER'));
+ $registry->pushApp('babel', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('babel', $e);
}
// Registry
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('chora', !defined('AUTH_HANDLER'));
+ $registry->pushApp('chora', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('chora', $e);
}
/**
* Crumb base application file.
*
- * $Horde$
- *
* Copyright 2008-2009 The Horde Project <http://www.horde.org>
*
* This file brings in all of the dependencies that every Crumb script will
* need, and sets up objects that all scripts use.
*
* @author Ben Klang <ben@alkaloid.net>
- *
*/
// Check for a prior definition of HORDE_BASE (perhaps by an auto_prepend_file
// Registry.
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('crumb', !defined('AUTH_HANDLER'));
+ $registry->pushApp('crumb', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('crumb', $e);
}
}
try {
- $registry->pushApp('fima', !defined('AUTH_HANDLER'));
+ $registry->pushApp('fima', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('fima', $e);
}
// Fima base library
require_once FIMA_BASE . '/lib/Driver.php';
-// Horde libraries.
-require_once 'Horde/History.php';
-
// Start output compression.
Horde::compressOutput();
<?php
-define('AUTH_HANDLER', true);
-define('HORDE_BASE', dirname(__FILE__) . '/..');
-require_once HORDE_BASE . '/lib/base.php';
-require_once 'Horde/Autoloader.php';
+$horde_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
$v = new Horde_View(array('templatePath' => dirname(__FILE__) . '/garland'));
new Horde_View_Helper_Block($v);
<?php
-define('AUTH_HANDLER', true);
-define('HORDE_BASE', dirname(__FILE__) . '/..');
-require_once HORDE_BASE . '/lib/base.php';
-require_once 'Horde/Autoloader.php';
+$horde_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
$v = new Horde_View(array('templatePath' => dirname(__FILE__) . '/garland'));
new Horde_View_Helper_Block($v);
* @author Duck <duck@obala.net>
*/
-define('AUTH_HANDLER', true);
-define('FOLKS_BASE', dirname(__FILE__) . '/..');
-require_once FOLKS_BASE . '/lib/base.php';
+$folks_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
$auth = Horde_Auth::singleton($conf['auth']['driver']);
// Registry.
$registry = Horde_Registry::singleton();
+$authentication = Horde_Util::nonInputVar('folks_authentication');
try {
- $registry->pushApp('folks', !defined('AUTH_HANDLER'));
+ $registry->pushApp('folks', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('folks', $e);
}
* @package Folks
*/
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
$auth = Horde_Auth::singleton($conf['auth']['driver']);
$link = Folks::getUrlFor('list', 'online', true);
$rss_link = Horde::applicationUrl('rss/friends.php', true);
-require FOLKS_TEMPLATES . '/feed/activities.php';
\ No newline at end of file
+require FOLKS_TEMPLATES . '/feed/activities.php';
* @package Folks
*/
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
$auth = Horde_Auth::singleton($conf['auth']['driver']);
$link = Folks::getUrlFor('list', 'online', true);
$rss_link = Horde::applicationUrl('rss/friends.php', true);
-require FOLKS_TEMPLATES . '/feed/feed.php';
\ No newline at end of file
+require FOLKS_TEMPLATES . '/feed/feed.php';
* @package Folks
*/
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
$auth = Horde_Auth::singleton($conf['auth']['driver']);
$link = Folks::getUrlFor('list', 'online', true);
$rss_link = Horde::applicationUrl('rss/friends.php', true);
-require FOLKS_TEMPLATES . '/feed/feed.php';
\ No newline at end of file
+require FOLKS_TEMPLATES . '/feed/feed.php';
* @package Folks
*/
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
$users = $folks_driver->getOnlineUsers();
$link = Folks::getUrlFor('list', 'online', true);
$rss_link = Horde::applicationUrl('rss/online.php', true);
-require FOLKS_TEMPLATES . '/feed/feed.php';
\ No newline at end of file
+require FOLKS_TEMPLATES . '/feed/feed.php';
exit;
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
// Make sure no one runs this from the web.
exit;
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
$db = DB::connect($conf['sql']);
$item = strtolower($item);
$item = str_replace('"', '', $item);
$item = str_replace("'", '', $item);
-}
\ No newline at end of file
+}
EOU;
}
-define('AUTH_HANDLER', true);
-define('HORDE_BASE', dirname(__FILE__) . '/../..');
-
// Do CLI checks and environment setup first.
-require_once HORDE_BASE . '/lib/core.php';
-require_once 'Horde/Cli.php';
+require_once dirname(__FILE__) . '/../../lib/core.php';
// Make sure no one runs this from the web.
if (!Horde_Cli::runningFromCLI()) {
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
Horde_Cli::init();
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
+$horde_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
-require_once 'Console/Getopt.php';
// Read command-line parameters.
$info = array();
* @package Folks
*/
-$no_compress = true;
-define('AUTH_HANDLER', true);
-define('FOLKS_BASE', dirname(__FILE__) . '/..');
-
// Do CLI checks and environment setup first.
require_once 'Horde/Cli.php';
// Load the CLI environment.
Horde_Cli::init();
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
// Load Folks.
-require_once FOLKS_BASE . '/lib/base.php';
+$folks_authentication = 'none';
+$no_compress = true;
+require_once dirname(__FILE__) . '/../lib/base.php';
require_once FOLKS_BASE . '/lib/version.php';
-require_once 'Horde/MIME/Mail.php';
// We accept the user name on the command-line.
-require_once 'Console/Getopt.php';
$ret = Console_Getopt::getopt(Console_Getopt::readPHPArgv(), 'h:u:p:dt:f:c:',
array('help', 'username=', 'password=', 'time=', 'from=', 'count='));
exit;
-define('AUTH_HANDLER', true);
+$folks_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
// Make sure no one runs this from the web.
// Load the CLI environment.
Horde_Cli::init();
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$db = DB::connect($conf['sql']);
if ($db instanceof PEAR_Error) {
* @package Horde_Image
*/
define('HORDE_BASE', '/var/www/html/horde');
-define('AUTH_HANDLER', true);
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
$GLOBALS['conf']['sql']['adapter'] = $GLOBALS['conf']['sql']['phptype'] == 'mysqli' ? 'mysqli' : 'pdo_' . $GLOBALS['conf']['sql']['phptype'];
$db = Horde_Db_Adapter::factory($GLOBALS['conf']['sql']);
<?php
/**
* Ingo base inclusion file.
+ *
* This file brings in all of the dependencies that every Ingo
* script will need and sets up objects that all scripts use.
*
+ * The following global variables are used:
+ * <pre>
+ * $ingo_authentication - The type of authentication to use:
+ * 'none' - Do not authenticate
+ * [DEFAULT] - Authenticate; on failed auth redirect to login screen
+ * </pre>
+ *
* Global variables defined:
* $ingo_shared - TODO
* $ingo_storage - The Ingo_Storage:: object to use for storing rules.
// Registry.
$registry = Horde_Registry::singleton();
+$authentication = Horde_Util::nonInputVar('ingo_authentication');
try {
- $registry->pushApp('ingo', !defined('AUTH_HANDLER'));
+ $registry->pushApp('ingo', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('ingo', $e);
}
* sender is blacklisted.
*/
-@define('AUTH_HANDLER', true);
-
// Do CLI checks and environment setup first.
-@define('HORDE_BASE', dirname(dirname(dirname(__FILE__))));
-require_once HORDE_BASE . '/lib/core.php';
+require_once dirname(__FILE__) . '/../../lib/core.php';
// Make sure no one runs this from the web.
if (!Horde_Cli::runningFromCLI()) {
Horde_Cli::init();
// Include needed libraries.
-require_once dirname(dirname(__FILE__)) . '/lib/base.php';
+$ingo_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
// Initialize authentication manager.
$auth = Horde_Auth::singleton($conf['auth']['driver']);
* upgrade script before executing this script.
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-
/* Set up the CLI environment */
-require_once HORDE_BASE . '/lib/core.php';
+require_once dirname(__FILE__) . '/../../../lib/core.php';
if (!Horde_Cli::runningFromCli()) {
exit("Must be run from the command line\n");
}
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
/* Grab what we need to steal the DB config */
require_once HORDE_BASE . '/config/conf.php';
-require_once 'MDB2.php';
$config = $GLOBALS['conf']['sql'];
unset($config['charset']);
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
-
/* Do CLI checks and environment setup first. */
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-require_once HORDE_BASE . '/lib/core.php';
+require_once dirname(__FILE__) . '/../../../lib/core.php';
/* Make sure no one runs this from the web. */
if (!Horde_Cli::runningFromCLI()) {
/* Load the CLI environment - make sure there's no time limit, init some
* variables, etc. */
Horde_Cli::init();
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
/* Initialize the needed libraries. */
-require_once dirname(dirname(dirname(__FILE__))) . '/lib/base.php';
+$ingo_authentication = 'none';
+require_once dirname(__FILE__) . '/../../lib/base.php';
/* Initialize storage backends. */
if ($conf['storage']['driver'] != 'sql') {
// Registry.
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('jeta', !defined('AUTH_HANDLER'));
+ $registry->pushApp('jeta', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('jeta', $e);
}
// Registry.
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('kastalia', !defined('AUTH_HANDLER'));
+ $registry->pushApp('kastalia', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('kastalia', $e);
}
// Registry.
$registry = Horde_Registry::singleton();
try {
- $registry->pushApp('kastalia', !defined('AUTH_HANDLER'));
+ $registry->pushApp('kastalia', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('kastalia', $e);
}
#!@php_bin@
<?php
-
-define('AUTH_HANDLER', true);
-
/**
* The Autoloader allows us to omit "require/include" statements.
*/
* really satisfying. We need it to know the location of the
* configuration though.
*/
+$koward_authentication = 'none';
require_once $opts->base . '/koward/config/base.php';
/**
// The following actions do not need write access to the session and
// should be opened read-only for performance reasons.
if (in_array($action, array())) {
- $session_control = 'readonly';
+ $kronolith_session_control = 'readonly';
}
-$session_timeout = 'json';
+$kronolith_session_timeout = 'json';
require_once KRONOLITH_BASE . '/lib/base.php';
// Process common request variables.
* @package Kronolith
*/
-@define('AUTH_HANDLER', true);
+$kronolith_authentication = 'none';
require_once dirname(__FILE__) . '/lib/base.php';
$cal = Horde_Util::getFormData('c');
* @package Kronolith
*/
-@define('AUTH_HANDLER', true);
-$session_control = 'none';
+$kronolith_authentication = 'none';
+$kronolith_session_control = 'none';
require_once dirname(__FILE__) . '/lib/base.php';
// We want to always generate UTF-8 iCalendar data.
exit;
}
-$session_control = 'readonly';
-@define('AUTH_HANDLER', true);
+$kronolith_authentication = 'none';
+$kronolith_session_control = 'readonly';
require_once dirname(__FILE__) . '/../lib/base.php';
require_once KRONOLITH_BASE . '/lib/version.php';
require_once 'Horde/Identity.php';
* This file brings in all of the dependencies that every Kronolith
* script will need, and sets up objects that all scripts use.
*
- * The following variables, defined in the script that calls this one, are
- * used:
- * - $session_control - Sets special session control limitations
+ * The following global variables are used:
+ * <pre>
+ * $kronolith_authentication - The type of authentication to use:
+ * 'none' - Do not authenticate
+ * [DEFAULT] - Authenticate; on failure redirect to login screen
+ * $kronolith_session_control - Sets special session control limitations:
+ * 'none' - Do not start a session
+ * 'readonly' - Start session readonly
+ * [DEFAULT] - Start read-write session
+ * </pre>
*
* @package Kronolith
*/
require_once HORDE_BASE . '/lib/core.php';
/* Registry. */
-$session_control = Horde_Util::nonInputVar('session_control');
-if ($session_control == 'none') {
- $registry = Horde_Registry::singleton(Horde_Registry::SESSION_NONE);
-} elseif ($session_control == 'readonly') {
- $registry = Horde_Registry::singleton(Horde_Registry::SESSION_READONLY);
-} else {
- $registry = Horde_Registry::singleton();
+$s_ctrl = 0;
+switch (Horde_Util::nonInputVar('kronolith_session_control')) {
+case 'none':
+ $s_ctrl = Horde_Registry::SESSION_NONE;
+ break;
+
+case 'readonly':
+ $s_ctrl = Horde_Registry::SESSION_READONLY;
+ break;
}
+$registry = Horde_Registry::singleton($s_ctrl);
+$authentication = Horde_Util::nonInputVar('kronolith_authentication');
try {
- $registry->pushApp('kronolith', !defined('AUTH_HANDLER'));
+ $registry->pushApp('kronolith', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('kronolith', $e);
}
$notification = Horde_Notification::singleton();
$GLOBALS['kronolith_notify'] = $notification->attach('status', null, 'Kronolith_Notification_Listener_Status');
-/* Start compression, if requested. */
+/* Start compression. */
Horde::compressOutput();
/* Set the timezone variable, if available. */
require 'Horde/Cli.php';
Horde_Cli::init();
-define('AUTH_HANDLER', true);
+$kronolith_authentication = 'none';
require dirname(__FILE__) . '/../base.php';
require 'Horde/iCalendar.php';
* @author Chuck Hagenbuch <chuck@horde.org>
*/
-define('AUTH_HANDLER', true);
+$kronolith_authentication = 'none';
require_once dirname(__FILE__) . '/../lib/base.php';
require_once 'Horde/Identity.php';
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
+$kronolith_authentication = 'none';
@define('HORDE_BASE', dirname(__FILE__) . '/../..');
// Do CLI checks and environment setup first.
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-@define('KRONOLITH_BASE', dirname(__FILE__) . '/..');
-
// Do CLI checks and environment setup first.
-require_once HORDE_BASE . '/lib/core.php';
+require_once dirname(__FILE__) . '/../../lib/core.php';
// Makre sure no one runs this from the web.
if (!Horde_Cli::runningFromCli()) {
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
// Read command line parameters.
$default_tz = date_default_timezone_get();
// Make sure we load Horde base to get the auth config
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
if ($conf['auth']['admins']) {
Horde_Auth::setAuth($conf['auth']['admins'][0], array());
// Now that we are authenticated, we can load Kronolith's base. Otherwise, the
// share code breaks, causing a new, completely empty share to be created with
// no owner.
-require_once KRONOLITH_BASE . '/lib/base.php';
+require_once dirname(__FILE__) . '/../lib/base.php';
// Connect to database.
-$db = &DB::connect($dsn);
+$db = DB::connect($dsn);
if (is_a($db, 'PEAR_Error')) {
$cli->fatal($db->toString());
}
* 2.1_to_2.2.sql upgrade script for your RDBMS before executing this script.
*/
-@define('AUTH_HANDLER', true);
-
/* Set up the CLI environment */
require_once dirname(__FILE__) . '/../../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
* This script converts all dates from the user's timezone to UTC.
*/
-@define('AUTH_HANDLER', true);
-
/* Set up the CLI environment. */
require_once dirname(__FILE__) . '/../../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
if (!Horde_Cli::runningFromCLI()) {
exit("Must be run from the command line\n");
}
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
/* Load required libraries. */
+$kronolith_authentication = 'none';
require_once KRONOLITH_BASE . '/../../lib/base.php';
require_once 'Horde/Prefs.php';
// Registry.
$registry = Horde_Registry::singleton();
+$authentication = Horde_Util::nonInputVar('news_authentication');
try {
- $registry->pushApp('news', !defined('AUTH_HANDLER'));
+ $registry->pushApp('news', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('news', $e);
}
* @author Duck <duck@obala.net>
*/
-define('AUTH_HANDLER', true);
-define('NEWS_BASE', dirname(__FILE__) . '/../');
-require_once NEWS_BASE . '/lib/base.php';
+$news_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
$cache_key = 'news_rss_comments';
$rss = $cache->get($cache_key, $conf['cache']['default_lifetime']);
* @author Duck <duck@obala.net>
*/
-define('AUTH_HANDLER', true);
-define('NEWS_BASE', dirname(__FILE__) . '/../');
-require_once NEWS_BASE . '/lib/base.php';
+$news_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
// Show a specific user?
$cache_key = 'news_rss_index';
* @author McLion <mclion@obala.net>
*/
-define('AUTH_HANDLER', true);
-define('NEWS_BASE', dirname(__FILE__) . '/../');
-require_once NEWS_BASE . '/lib/base.php';
+$news_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
$cache_key = 'news_rss_news';
$rss = $cache->get($cache_key, $conf['cache']['default_lifetime']);
* @package News
*/
-define('AUTH_HANDLER', true);
+$news_authentication = 'none';
require_once dirname(__FILE__) . '/lib/base.php';
if ($browser->isRobot()) {
// Registry.
$registry = Horde_Registry::singleton();
+$authentication = Horde_Util::nonInputVar('skoli_authentication');
try {
- $registry->pushApp('skoli', !defined('AUTH_HANDLER'));
+ $registry->pushApp('skoli', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('skoli', $e);
}
$conf = &$GLOBALS['conf'];
@define('SKOLI_TEMPLATES', $registry->get('templates'));
-// Horde framework libraries.
-require_once 'Horde/History.php';
-
// Notification system.
-$notification = &Horde_Notification::singleton();
+$notification = Horde_Notification::singleton();
$notification->attach('status');
// Define the base file path of Skoli.
@define('SKOLI_BASE', dirname(__FILE__) . '/..');
-// Skoli base library
-require_once SKOLI_BASE . '/lib/Skoli.php';
-require_once SKOLI_BASE . '/lib/Driver.php';
-
// Start output compression.
Horde::compressOutput();
// Create a share instance.
-require_once 'Horde/Share.php';
-$GLOBALS['skoli_shares'] = &Horde_Share::singleton($registry->getApp());
+$GLOBALS['skoli_shares'] = Horde_Share::singleton($registry->getApp());
Skoli::initialize();
* @author Chuck Hagenbuch <chuck@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('SKOLI_BASE', dirname(__FILE__) . '/..');
-require_once SKOLI_BASE . '/lib/base.php';
-require_once 'Horde/Image.php';
+$skoli_authentication = 'none';
+require_once dirname(__FILE__) . '/../lib/base.php';
require_once 'Horde/Prefs/CategoryManager.php';
header('Content-Type: text/css');
}
try {
- $registry->pushApp('timeobjects', !defined('AUTH_HANDLER'));
+ $registry->pushApp('timeobjects', true);
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('timeobjects', $e);
}
*
* This file brings in all of the dependencies that every Turba script will
* need, and sets up objects that all scripts use.
+ *
+ * The following global variables are used:
+ * <pre>
+ * $ingo_authentication - The type of authentication to use:
+ * 'none' - Do not authenticate
+ * [DEFAULT] - Authenticate; on failed auth redirect to login screen
+ * </pre>
*/
// Determine BASE directories.
// Registry.
$registry = Horde_Registry::singleton();
+$authentication = Horde::nonInputVar('turba_authentication');
try {
- $registry->pushApp('turba', !defined('AUTH_HANDLER'));
+ $registry->pushApp('turba', ($authentication != 'none'));
} catch (Horde_Exception $e) {
Horde_Auth::authenticationFailureRedirect('turba', $e);
}
* @author Ben Chavet <ben@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-@define('TURBA_BASE', dirname(__FILE__) . '/..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Makre sure no one runs this from the web.
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
// Read command line parameters.
$data = $argv[1];
// Make sure we load Horde base to get the auth config
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
if ($conf['auth']['admins']) {
Horde_Auth::setAuth($conf['auth']['admins'][0], array());
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-@define('TURBA_BASE', dirname(__FILE__) . '/..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Makre sure no one runs this from the web.
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
// Read command line parameters.
$dsn = $argv[1];
// Make sure we load Horde base to get the auth config
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
if ($conf['auth']['admins']) {
Horde_Auth::setAuth($conf['auth']['admins'][0], array());
require_once 'Horde/Mime/Address.php';
// Connect to database.
-$db = &DB::connect($dsn);
+$db = DB::connect($dsn);
if (is_a($db, 'PEAR_Error')) {
$cli->fatal($db->toString());
}
if (is_a($handle, 'PEAR_Error')) {
$cli->fatal($handle->toString());
}
-$turba_shares = &Horde_Share::singleton('turba');
+$turba_shares = Horde_Share::singleton('turba');
$user = null;
$count = 0;
while ($row = $handle->fetchRow(DB_FETCHMODE_ASSOC)) {
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.local.php';
require_once HORDE_BASE . '/lib/core.php';
// Make sure no one runs this from the web.
// Load the CLI environment - make sure there's no time limit, init some
// variables, etc.
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
// Read command line parameters.
$do_email = true;
/* YOU SHOULD NOT HAVE TO TOUCH ANYTHING BELOW THIS LINE */
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-
/* Set up the CLI environment */
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
if (!Horde_Cli::runningFromCli()) {
exit("Must be run from the command line\n");
}
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
/* Grab what we need to steal the DB config */
require_once HORDE_BASE . '/config/conf.php';
require_once 'Horde/Form.php';
-require 'Horde/NLS/carsigns.php';
-require_once 'DB.php';
$config = $GLOBALS['conf']['sql'];
$config['username'] = $db_user;
return $address;
}
- require_once 'Mail/RFC822.php';
- require_once 'Horde/Mime/Address.php';
-
static $rfc822;
if (is_null($rfc822)) {
$rfc822 = new Mail_RFC822();
* @author Jan Schneider <jan@horde.org>
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Make sure no one runs this from the web.
// variables, etc.
Horde_Cli::init();
-@define('TURBA_BASE', dirname(__FILE__) . '/../..');
+$turba_authentication = 'none';
require_once TURBA_BASE . '/lib/base.php';
// Instantiate DataTree.
* confuse the new Turba code.
*/
-@define('AUTH_HANDLER', true);
-@define('TURBA_BASE', dirname(__FILE__) . '/../..');
-@define('HORDE_BASE', TURBA_BASE . '/..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Make sure no one runs this from the web.
// some variables, etc.
Horde_Cli::init();
+$turba_authentication = 'none';
require_once TURBA_BASE . '/lib/base.php';
// Re-load source config.
* requirements of the future Share API.
*/
-@define('AUTH_HANDLER', true);
-@define('TURBA_BASE', dirname(__FILE__) . '/../..');
-@define('HORDE_BASE', TURBA_BASE . '/..');
-
// Do CLI checks and environment setup first.
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Make sure no one runs this from the web.
// some variables, etc.
Horde_Cli::init();
+$turba_authentication = 'none';
require_once TURBA_BASE . '/lib/base.php';
// Re-load source config.
* executing this script.
*/
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-
/* Set up the CLI environment */
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
if (!Horde_Cli::runningFromCli()) {
exit("Must be run from the command line\n");
}
-$cli = &Horde_Cli::singleton();
+$cli = Horde_Cli::singleton();
$cli->init();
/* Grab what we need to steal the DB config */
require_once HORDE_BASE . '/config/conf.php';
-require_once 'MDB2.php';
$config = $GLOBALS['conf']['sql'];
unset($config['charset']);
*/
// Load Horde and Turba enviroments
-@define('AUTH_HANDLER', true);
-@define('HORDE_BASE', dirname(__FILE__) . '/../../..');
-@define('TURBA_BASE', dirname(__FILE__) . '/../..');
+require_once dirname(__FILE__) . '/../lib/base.load.php';
require_once HORDE_BASE . '/lib/core.php';
// Set up the CLI enviroment.
exit("Must be run from the command line\n");
}
Horde_Cli::init();
-$CLI = &Horde_Cli::singleton();
+$CLI = Horde_Cli::singleton();
// Make sure we load Horde base to get the auth config
+$horde_authentication = 'none';
require_once HORDE_BASE . '/lib/base.php';
if ($conf['auth']['admins']) {
Horde_Auth::setAuth($conf['auth']['admins'][0], array());