[Rt-commit] r10295 - in rt/branches/3.7-EXPERIMENTAL: . lib
jesse at bestpractical.com
jesse at bestpractical.com
Sat Jan 12 22:07:50 EST 2008
Author: jesse
Date: Sat Jan 12 22:07:50 2008
New Revision: 10295
Modified:
rt/branches/3.7-EXPERIMENTAL/ (props changed)
rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in
rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm
Log:
Merge RTIR releng bugfixes down to trunk
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT.pm.in Sat Jan 12 22:07:50 2008
@@ -52,7 +52,7 @@
use File::Spec ();
-use vars qw($Config $System $SystemUser $Nobody $Handle $Logger);
+use vars qw($Config $System $SystemUser $Nobody $Handle $Logger %InitCallbacks);
our $VERSION = '@RT_VERSION_MAJOR at .@RT_VERSION_MINOR at .@RT_VERSION_PATCH@';
@@ -143,7 +143,8 @@
ConnectToDatabase();
InitSystemObjects();
InitClasses();
- InitLogging();
+ InitLogging();
+ $_->() foreach @{ $InitCallbacks{'Init'} || [] };
InitPlugins();
}
@@ -418,6 +419,7 @@
RT::ObjectCustomFieldValue
RT::Attribute
);
+ $_->() foreach @{ $InitCallbacks{'InitClasses'} || [] };
}
=head2 InitSystemObjects
@@ -440,6 +442,8 @@
require RT::System;
$System = new RT::System;
+
+ $_->() foreach @{ $InitCallbacks{'InitSystemObjects'} || [] };
}
=head1 CLASS METHODS
Modified: rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm (original)
+++ rt/branches/3.7-EXPERIMENTAL/lib/RT/Config.pm Sat Jan 12 22:07:50 2008
@@ -279,6 +279,10 @@
Extension => $is_ext,
);
};
+ local *Register = sub {
+ my ($type, $cb) = @_;
+ push @{ $RT::InitCallbacks{ $type } ||=[] }, $cb;
+ };
local @INC = ($RT::LocalEtcPath, $RT::EtcPath, @INC);
require $args{'File'};
};
More information about the Rt-commit
mailing list