X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Flib%2FRT.pm;h=5d2e70425921595de9b92cae2c08abde402759c6;hb=f360579dd091f1adf9cea1062aa06afdf5bff42b;hp=c4f066e90aea75d9b13901d0891fb5dacaee259b;hpb=624b2d44625f69d71175c3348cae635d580c890b;p=freeside.git diff --git a/rt/lib/RT.pm b/rt/lib/RT.pm index c4f066e90..5d2e70425 100644 --- a/rt/lib/RT.pm +++ b/rt/lib/RT.pm @@ -57,7 +57,7 @@ use Cwd (); use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE); -our $VERSION = '3.8.7'; +our $VERSION = '3.8.8'; @@ -354,7 +354,12 @@ sub InitLogging { )); } } + InitSignalHandlers(%arg); +} + +sub InitSignalHandlers { + my %arg = @_; # Signal handlers ## This is the default handling of warnings and die'ings in the code @@ -430,6 +435,8 @@ Load all modules that define base classes. =cut sub InitClasses { + shift if @_%2; # so we can call it as a function or method + my %args = (@_); require RT::Tickets; require RT::Transactions; require RT::Attachments; @@ -474,6 +481,25 @@ sub InitClasses { RT::ObjectCustomFieldValue RT::Attribute ); + + if ( $args{'Heavy'} ) { + # load scrips' modules + my $scrips = RT::Scrips->new($RT::SystemUser); + $scrips->Limit( FIELD => 'Stage', OPERATOR => '!=', VALUE => 'Disabled' ); + while ( my $scrip = $scrips->Next ) { + $scrip->LoadModules; + } + + foreach my $class ( grep $_, RT->Config->Get('CustomFieldValuesSources') ) { + local $@; + eval "require $class; 1" or $RT::Logger->error( + "Class '$class' is listed in CustomFieldValuesSources option" + ." in the config, but we failed to load it:\n$@\n" + ); + } + + RT::I18N->LoadLexicons; + } } =head2 InitSystemObjects