[freeside-commits] freeside/rt/lib RT.pm,1.8,1.9 RT.pm.in,1.2,1.3

Ivan,,, ivan at wavetail.420.am
Tue May 18 12:20:30 PDT 2010


Update of /home/cvs/cvsroot/freeside/rt/lib
In directory wavetail.420.am:/tmp/cvs-serv2904/lib

Modified Files:
	RT.pm RT.pm.in 
Log Message:
merging rt \3.8.8 to HEAD

Index: RT.pm.in
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT.pm.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -w -d -r1.2 -r1.3
--- RT.pm.in	9 Feb 2010 21:49:16 -0000	1.2
+++ RT.pm.in	18 May 2010 19:20:28 -0000	1.3
@@ -354,7 +354,10 @@
                          ));
         }
     }
+    InitSignalHandlers();
+}
 
+sub InitSignalHandlers {
 
 # Signal handlers
 ## This is the default handling of warnings and die'ings in the code
@@ -430,6 +433,8 @@
 =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 @@
         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

Index: RT.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/rt/lib/RT.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- RT.pm	9 Feb 2010 21:49:16 -0000	1.8
+++ RT.pm	18 May 2010 19:20:28 -0000	1.9
@@ -57,7 +57,7 @@
 
 use vars qw($Config $System $SystemUser $Nobody $Handle $Logger $_INSTALL_MODE);
 
-our $VERSION = '3.8.7';
+our $VERSION = '3.8.8';
 
 
 
@@ -354,7 +354,10 @@
                          ));
         }
     }
+    InitSignalHandlers();
+}
 
+sub InitSignalHandlers {
 
 # Signal handlers
 ## This is the default handling of warnings and die'ings in the code
@@ -430,6 +433,8 @@
 =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 @@
         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



More information about the freeside-commits mailing list