From 938cf9f540b6aba08cb5db12d13df17ca0bcda21 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 10 Jun 2009 13:41:38 -0600 Subject: [PATCH] Horde_CLI:: -> Horde_Cli:: --- folks/scripts/activity.php | 11 ++++------- folks/scripts/mail-filter.php | 8 ++++---- folks/scripts/mail.php | 8 ++++---- folks/scripts/popularity.php | 11 ++++------- imp/scripts/bounce_spam.php | 8 ++++---- ingo/scripts/ingo-postfix-policyd | 4 ++-- ingo/scripts/upgrades/convert_datatree_shares_to_sql.php | 4 ++-- ingo/scripts/upgrades/convert_prefs_to_sql.php | 6 +++--- koward/lib/Koward.php | 2 +- koward/script/Koward/koward.php | 2 +- kronolith/lib/tests/toicalendar.phpt | 4 ++-- kronolith/scripts/agenda.php | 6 ++---- kronolith/scripts/import_icals.php | 6 +++--- kronolith/scripts/import_squirrelmail_calendar.php | 6 +++--- kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php | 8 +++----- kronolith/scripts/upgrades/convert_to_utc.php | 8 +++----- 16 files changed, 45 insertions(+), 57 deletions(-) diff --git a/folks/scripts/activity.php b/folks/scripts/activity.php index 4c6a6322a..160f6444b 100644 --- a/folks/scripts/activity.php +++ b/folks/scripts/activity.php @@ -18,17 +18,14 @@ exit; define('AUTH_HANDLER', true); require_once dirname(__FILE__) . '/../lib/base.php'; -// Do CLI checks and environment setup first. -require_once 'Horde/CLI.php'; - // Make sure no one runs this from the web. -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } // Load the CLI environment. -Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +Horde_Cli::init(); +$cli = &Horde_Cli::singleton(); $db = DB::connect($conf['sql']); if ($db instanceof PEAR_Error) { @@ -140,4 +137,4 @@ while (list($u,$v) = each($users)) { } $cli->message($u . ' ' . $p, 'cli.success'); -} \ No newline at end of file +} diff --git a/folks/scripts/mail-filter.php b/folks/scripts/mail-filter.php index 10de438c0..bf0b4c584 100644 --- a/folks/scripts/mail-filter.php +++ b/folks/scripts/mail-filter.php @@ -42,17 +42,17 @@ 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 'Horde/Cli.php'; // Make sure no one runs this from the web. -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } // Load the CLI environment - make sure there's no time limit, init some // variables, etc. -Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +Horde_Cli::init(); +$cli = &Horde_Cli::singleton(); require_once dirname(__FILE__) . '/../lib/base.php'; require_once 'Console/Getopt.php'; diff --git a/folks/scripts/mail.php b/folks/scripts/mail.php index 2aed62bd0..3d5913793 100644 --- a/folks/scripts/mail.php +++ b/folks/scripts/mail.php @@ -18,16 +18,16 @@ define('AUTH_HANDLER', true); define('FOLKS_BASE', dirname(__FILE__) . '/..'); // Do CLI checks and environment setup first. -require_once 'Horde/CLI.php'; +require_once 'Horde/Cli.php'; // Make sure no one runs this from the web. -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } // Load the CLI environment. -Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +Horde_Cli::init(); +$cli = &Horde_Cli::singleton(); // Load Folks. require_once FOLKS_BASE . '/lib/base.php'; diff --git a/folks/scripts/popularity.php b/folks/scripts/popularity.php index c452a4a9a..f16b85575 100644 --- a/folks/scripts/popularity.php +++ b/folks/scripts/popularity.php @@ -18,17 +18,14 @@ exit; define('AUTH_HANDLER', true); require_once dirname(__FILE__) . '/../lib/base.php'; -// Do CLI checks and environment setup first. -require_once 'Horde/CLI.php'; - // Make sure no one runs this from the web. -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } // Load the CLI environment. -Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +Horde_Cli::init(); +$cli = &Horde_Cli::singleton(); $db = DB::connect($conf['sql']); if ($db instanceof PEAR_Error) { @@ -123,4 +120,4 @@ while ( list($u,$v) = each($users) ) { } $cli->message($u . ' ' . $p, 'cli.success'); -} \ No newline at end of file +} diff --git a/imp/scripts/bounce_spam.php b/imp/scripts/bounce_spam.php index f3c7c6b35..189cb19f7 100755 --- a/imp/scripts/bounce_spam.php +++ b/imp/scripts/bounce_spam.php @@ -17,10 +17,10 @@ */ define('IMP_CONFIG', dirname(__FILE__) . '/../config'); -require_once 'Horde/CLI.php'; +require_once 'Horde/Cli.php'; /* Make sure no one runs this from the web. */ -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { fwrite(STDERR, "Must be run from the command line\n"); exit(1); } @@ -32,10 +32,10 @@ if (!file_exists(IMP_CONFIG . '/bounce.txt')) { /* Load the CLI environment - make sure there's no time limit, init some * variables, etc. */ -Horde_CLI::init(); +Horde_Cli::init(); /* Read the message content. */ -$data = Horde_CLI::readStdin(); +$data = Horde_Cli::readStdin(); /* Who's the spammer? */ preg_match('/return-path: <(.*?)>\r?\n/i', $data, $matches); diff --git a/ingo/scripts/ingo-postfix-policyd b/ingo/scripts/ingo-postfix-policyd index 278fe0294..1969347a3 100755 --- a/ingo/scripts/ingo-postfix-policyd +++ b/ingo/scripts/ingo-postfix-policyd @@ -67,13 +67,13 @@ require_once HORDE_BASE . '/lib/core.php'; // Make sure no one runs this from the web. -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit(1); } // Load the CLI environment - make sure there's no time limit, init some // variables, etc. -Horde_CLI::init(); +Horde_Cli::init(); // Include needed libraries. require_once dirname(dirname(__FILE__)) . '/lib/base.php'; diff --git a/ingo/scripts/upgrades/convert_datatree_shares_to_sql.php b/ingo/scripts/upgrades/convert_datatree_shares_to_sql.php index 820ae1e01..73ad51414 100755 --- a/ingo/scripts/upgrades/convert_datatree_shares_to_sql.php +++ b/ingo/scripts/upgrades/convert_datatree_shares_to_sql.php @@ -11,10 +11,10 @@ /* Set up the CLI environment */ require_once HORDE_BASE . '/lib/core.php'; -if (!Horde_CLI::runningFromCli()) { +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 */ diff --git a/ingo/scripts/upgrades/convert_prefs_to_sql.php b/ingo/scripts/upgrades/convert_prefs_to_sql.php index a7fd44e41..056924927 100755 --- a/ingo/scripts/upgrades/convert_prefs_to_sql.php +++ b/ingo/scripts/upgrades/convert_prefs_to_sql.php @@ -25,14 +25,14 @@ require_once HORDE_BASE . '/lib/core.php'; /* Make sure no one runs this from the web. */ -if (!Horde_CLI::runningFromCLI()) { +if (!Horde_Cli::runningFromCLI()) { exit("Must be run from the command line\n"); } /* Load the CLI environment - make sure there's no time limit, init some * variables, etc. */ -Horde_CLI::init(); -$cli = &Horde_CLI::singleton(); +Horde_Cli::init(); +$cli = &Horde_Cli::singleton(); /* Initialize the needed libraries. */ require_once dirname(dirname(dirname(__FILE__))) . '/lib/base.php'; diff --git a/koward/lib/Koward.php b/koward/lib/Koward.php index 942615843..7c325ea2c 100644 --- a/koward/lib/Koward.php +++ b/koward/lib/Koward.php @@ -202,7 +202,7 @@ class Koward { if (!empty($session->user_uid)) { $user = $this->getObject($session->user_uid); if (get_class($user) == $this->conf['koward']['cli_admin'] - && Horde_CLI::runningFromCLI()) { + && Horde_Cli::runningFromCLI()) { return true; } $type = $this->getType($user); diff --git a/koward/script/Koward/koward.php b/koward/script/Koward/koward.php index e73ed96a9..8df9d86fe 100644 --- a/koward/script/Koward/koward.php +++ b/koward/script/Koward/koward.php @@ -34,7 +34,7 @@ if (!$opts->base) { * Ensure that the base parameters (especially SERVER_NAME) get set for the * command line. */ -$cli = Horde_CLI::singleton(); +$cli = Horde_Cli::singleton(); $cli->init(); /** diff --git a/kronolith/lib/tests/toicalendar.phpt b/kronolith/lib/tests/toicalendar.phpt index 2c26f7f2c..a5a5b6a83 100644 --- a/kronolith/lib/tests/toicalendar.phpt +++ b/kronolith/lib/tests/toicalendar.phpt @@ -3,8 +3,8 @@ Kronolith_Event::toiCalendar() test. --FILE-- init(); // Read command line parameters. diff --git a/kronolith/scripts/import_squirrelmail_calendar.php b/kronolith/scripts/import_squirrelmail_calendar.php index 374bb0008..e3996aa54 100755 --- a/kronolith/scripts/import_squirrelmail_calendar.php +++ b/kronolith/scripts/import_squirrelmail_calendar.php @@ -22,16 +22,16 @@ // Do CLI checks and environment setup first. require_once HORDE_BASE . '/lib/core.php'; -require_once 'Horde/CLI.php'; +require_once 'Horde/Cli.php'; // Makre sure no one runs this from the web. -if (!Horde_CLI::runningFromCli()) { +if (!Horde_Cli::runningFromCli()) { exit("Must be run from the command line\n"); } // 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. diff --git a/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php b/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php index ee552d06e..7db3b0ded 100755 --- a/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php +++ b/kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php @@ -4,8 +4,6 @@ * This script migrates Kronolith's share data from the datatree Horde_Share * driver to the new SQL Horde_Share driver. You should run the appropriate * 2.1_to_2.2.sql upgrade script for your RDBMS before executing this script. - * - * $Horde: kronolith/scripts/upgrades/convert_datatree_shares_to_sql.php,v 1.7 2008/10/23 15:45:05 jan Exp $ */ @define('AUTH_HANDLER', true); @@ -13,11 +11,11 @@ /* Set up the CLI environment */ require_once HORDE_BASE . '/lib/core.php'; -require_once 'Horde/CLI.php'; -if (!Horde_CLI::runningFromCli()) { +require_once 'Horde/Cli.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 */ diff --git a/kronolith/scripts/upgrades/convert_to_utc.php b/kronolith/scripts/upgrades/convert_to_utc.php index 9fa8de2f2..980be7d51 100755 --- a/kronolith/scripts/upgrades/convert_to_utc.php +++ b/kronolith/scripts/upgrades/convert_to_utc.php @@ -2,8 +2,6 @@ init(); /* Load required libraries. */ -- 2.11.0