[Rt-commit] rt branch, 4.4.3/skip-extract-pm-require, created. rt-4.4.3beta1-11-gfc500defb

Jim Brandt jbrandt at bestpractical.com
Thu Jun 21 16:07:33 EDT 2018


The branch, 4.4.3/skip-extract-pm-require has been created
        at  fc500defb7f1f1559f4f29acb32c31a803bd8379 (commit)

- Log -----------------------------------------------------------------
commit fc500defb7f1f1559f4f29acb32c31a803bd8379
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.

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