diff options
author | ivan <ivan> | 2010-05-18 19:20:29 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-05-18 19:20:29 +0000 |
commit | b102662c11390d9220ef7a935ce847f18ba221fb (patch) | |
tree | f3c06005ce9dd362b40c133a098140d34d909c84 /rt/lib/RT.pm.in | |
parent | 624b2d44625f69d71175c3348cae635d580c890b (diff) |
merging rt \3.8.8 to HEAD
Diffstat (limited to 'rt/lib/RT.pm.in')
-rw-r--r-- | rt/lib/RT.pm.in | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rt/lib/RT.pm.in b/rt/lib/RT.pm.in index a5f8e01e2..367086de4 100644 --- a/rt/lib/RT.pm.in +++ b/rt/lib/RT.pm.in @@ -354,7 +354,10 @@ sub InitLogging { )); } } + InitSignalHandlers(); +} +sub InitSignalHandlers { # Signal handlers ## This is the default handling of warnings and die'ings in the code @@ -430,6 +433,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 +479,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 |