[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.8-71-gac6d4ca
Kevin Falcone
falcone at bestpractical.com
Thu Jun 3 12:07:07 EDT 2010
The branch, 3.8-trunk has been updated
via ac6d4cac27be4c939df9276c103b30b414390880 (commit)
from ac1049ba3b1ec64028a2f0557454a6a6e429231a (commit)
Summary of changes:
bin/rt-crontool.in | 5 +++--
sbin/rt-email-dashboards.in | 6 +++---
2 files changed, 6 insertions(+), 5 deletions(-)
- Log -----------------------------------------------------------------
commit ac6d4cac27be4c939df9276c103b30b414390880
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Thu Jun 3 12:04:41 2010 -0400
RT::Init() needs to run before use RT::Tickets;
Because RT::Init pushes Plugin Paths onto @INC at run time, if we
use RT::Tickets; it will never see a Tickets_Local.pm in a plugin.
The best way to fix this is with a BEGIN block around RT::Init, but this
will really screw up rt-crontool's ability to pull LogLevel from the
command line, so we're doing the 'switch to require' approach instead.
diff --git a/bin/rt-crontool.in b/bin/rt-crontool.in
index 2543363..41ee4e6 100755
--- a/bin/rt-crontool.in
+++ b/bin/rt-crontool.in
@@ -79,8 +79,6 @@ use RT;
use Getopt::Long;
use RT::Interface::CLI qw(CleanEnv GetCurrentUser GetMessageContent loc);
-use RT::Tickets;
-use RT::Template;
#Clean out all the nasties from the environment
CleanEnv();
@@ -112,6 +110,9 @@ RT->Config->Set( LogToScreen => $log ) if $log;
#Connect to the database and get RT::SystemUser and RT::Nobody loaded
RT::Init();
+require RT::Tickets;
+require RT::Template;
+
#Get the current user all loaded
my $CurrentUser = GetCurrentUser();
diff --git a/sbin/rt-email-dashboards.in b/sbin/rt-email-dashboards.in
index 5565435..645f782 100644
--- a/sbin/rt-email-dashboards.in
+++ b/sbin/rt-email-dashboards.in
@@ -75,9 +75,6 @@ BEGIN {
}
use RT;
-use RT::Interface::Web;
-use RT::Interface::Web::Handler;
-use RT::Dashboard;
use RT::Interface::CLI qw{ CleanEnv loc };
use Getopt::Long;
@@ -97,6 +94,9 @@ RT::LoadConfig();
# Connect to the database and get RT::SystemUser and RT::Nobody loaded
RT::Init();
+require RT::Interface::Web;
+require RT::Interface::Web::Handler;
+require RT::Dashboard;
$HTML::Mason::Commands::r = RT::Dashboard::FakeRequest->new;
no warnings 'once';
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list