[Rt-commit] rt branch, 4.0/restore-heavy-initclasses, created. rt-4.0.18-127-gd277f6c
Kevin Falcone
falcone at bestpractical.com
Fri Dec 27 15:11:36 EST 2013
The branch, 4.0/restore-heavy-initclasses has been created
at d277f6cd15e3ecbcac2cdde87f7cc41f6afe17fb (commit)
- Log -----------------------------------------------------------------
commit d277f6cd15e3ecbcac2cdde87f7cc41f6afe17fb
Author: Kevin Falcone <falcone at bestpractical.com>
Date: Fri Dec 27 14:17:42 2013 -0500
Pass Heavy => 1 to InitClasses to enable error checking
8976c535 erroneously claimed that it was replacing a clone of RT->Init,
but missed that RT->Init doesn't call InitClasses(Heavy => 1) but
standalone_httpd did.
When standalone_httpd and rt-server were mashed together during the
PSGIfication, Heavy => 1 had already been removed. Sadly - the other
Heavy => 1 usage in webmux.pl was lost in e1c6d4a8c.
This means that no version of RT 4.0.x or 4.2.x has checked if your
Scrips had a valid Condition and Action, or checked your classes in
CustomFieldValuesSources. It also misses the pre-loading we were trying
to do for the sake of mod_perl (21f181dd).
It's likely the CustomFieldValuesSources check could go in a
PostLoadCheck, but the Scrips code would need to keep living here.
The LoadLexicons which was also added for caching (21f181dd) was removed
a month before all the Heavy code broke in order to improve test
performance 5f2799c5, it's unclear if it should come back in some cases.
diff --git a/lib/RT.pm b/lib/RT.pm
index 91123b2..3c3642d 100644
--- a/lib/RT.pm
+++ b/lib/RT.pm
@@ -181,6 +181,8 @@ up logging|/InitLogging>, and L<loads plugins|/InitPlugins>.
=cut
sub Init {
+ shift if @_%2; # code is inconsistent about calling as method
+ my %args = (@_);
CheckPerlRequirements();
@@ -189,7 +191,7 @@ sub Init {
#Get a database connection
ConnectToDatabase();
InitSystemObjects();
- InitClasses();
+ InitClasses(%args);
InitLogging();
InitPlugins();
RT::I18N->Init;
diff --git a/sbin/rt-server.in b/sbin/rt-server.in
index 632ba0b..c90ce21 100644
--- a/sbin/rt-server.in
+++ b/sbin/rt-server.in
@@ -127,7 +127,7 @@ EOF
RT->InstallMode(1);
} else {
- RT->Init();
+ RT->Init( Heavy => 1 );
my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post');
unless ( $status ) {
-----------------------------------------------------------------------
More information about the rt-commit
mailing list