[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.6-46-g15afb7b
sunnavy at bestpractical.com
sunnavy at bestpractical.com
Wed Oct 28 03:25:54 EDT 2009
The branch, 3.8-trunk has been updated
via 15afb7b20affec5cd0ad59477406c94fefa854d6 (commit)
from 2643a97bfa546899db7f8976d33c78f5cfe3649b (commit)
Summary of changes:
lib/RT.pm.in | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
- Log -----------------------------------------------------------------
commit 15afb7b20affec5cd0ad59477406c94fefa854d6
Author: sunnavy <sunnavy at bestpractical.com>
Date: Wed Oct 28 15:25:21 2009 +0800
append plugin lib path to @INC if local lib path is *not* in @INC: see also ticket #13944
diff --git a/lib/RT.pm.in b/lib/RT.pm.in
index fb8afcb..f0e56e8 100755
--- a/lib/RT.pm.in
+++ b/lib/RT.pm.in
@@ -595,6 +595,7 @@ sub PluginDirs {
=head2 InitPluginPaths
Push plugins' lib paths into @INC right after F<local/lib>.
+In case F<local/lib> isn't in @INC, append them to @INC
=cut
@@ -604,13 +605,19 @@ sub InitPluginPaths {
my @lib_dirs = $self->PluginDirs('lib');
my @tmp_inc;
+ my $added;
for (@INC) {
if ( Cwd::realpath($_) eq $RT::LocalLibPath) {
push @tmp_inc, $_, @lib_dirs;
+ $added = 1;
} else {
push @tmp_inc, $_;
}
}
+
+ # append @lib_dirs in case $RT::LocalLibPath isn't in @INC
+ push @tmp_inc, @lib_dirs unless $added;
+
my %seen;
@INC = grep !$seen{$_}++, @tmp_inc;
}
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list