[Rt-commit] rt branch, 4.4.3/skip-extract-pm-require, created. rt-4.4.3beta1-11-gd044c1620
Jim Brandt
jbrandt at bestpractical.com
Thu Jun 21 16:11:08 EDT 2018
The branch, 4.4.3/skip-extract-pm-require has been created
at d044c16201c3e98ab63bc6c0bdaaeb3a31b5d0fe (commit)
- Log -----------------------------------------------------------------
commit d044c16201c3e98ab63bc6c0bdaaeb3a31b5d0fe
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Thu Jun 21 16:03:56 2018 -0400
Skip PO utility module when loading language files
When initializing, RT::I18N loads any language files from the
RT/I18N directory. 495bf0f8 added a new utility module to the
same directory. Explicitly avoid auto-requiring it when
initializing since it is used for testing.
Fixes: I#33823
diff --git a/lib/RT/I18N.pm b/lib/RT/I18N.pm
index a4ee9c840..f2650a3d6 100644
--- a/lib/RT/I18N.pm
+++ b/lib/RT/I18N.pm
@@ -103,6 +103,7 @@ sub Init {
# Load language-specific functions
foreach my $file ( File::Glob::bsd_glob(substr(Cwd::abs_path(__FILE__), 0, -3) . "/*.pm") ) {
my ($lang) = ($file =~ /([^\\\/]+?)\.pm$/);
+ next if $lang eq 'Extract'; # Avoid loading non-language utility module
next unless grep $_ eq '*' || $_ eq $lang, @lang;
require $file;
}
-----------------------------------------------------------------------
More information about the rt-commit
mailing list