make installClass read lines from preload.custom for additional directories. Fixes bug #12189
This commit is contained in:
parent
9113408408
commit
9985d24ea2
2 changed files with 28 additions and 0 deletions
|
|
@ -12,6 +12,7 @@
|
||||||
- fixed #12190: List type form plugins that do not override getOptions show no value when getValueAsHtml is called
|
- fixed #12190: List type form plugins that do not override getOptions show no value when getValueAsHtml is called
|
||||||
- fixed #12135: Geo::Coder::Googlev3 needs common sense
|
- fixed #12135: Geo::Coder::Googlev3 needs common sense
|
||||||
- fixed #12183: Posts do not disqualify themselves when purged
|
- fixed #12183: Posts do not disqualify themselves when purged
|
||||||
|
- fixed #12189: installClass ignores preload.custom
|
||||||
|
|
||||||
7.10.19
|
7.10.19
|
||||||
- fixed #12169: extras uploads symlink export
|
- fixed #12169: extras uploads symlink export
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,15 @@ if( ! -e $configFile ) {
|
||||||
|
|
||||||
die "Config file '$configFile' does not exist!\n" if ! -e $configFile;
|
die "Config file '$configFile' does not exist!\n" if ! -e $configFile;
|
||||||
|
|
||||||
|
foreach my $libDir ( readLines( "preload.custom" ) ) {
|
||||||
|
if ( !-d $libDir ) {
|
||||||
|
warn "WARNING: Not adding lib directory '$libDir' from preload.custom: Directory does not exist.\n";
|
||||||
|
next;
|
||||||
|
}
|
||||||
|
unshift @INC, $libDir;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Open the session
|
# Open the session
|
||||||
my $session = WebGUI::Session->open( $webguiRoot, $configFile );
|
my $session = WebGUI::Session->open( $webguiRoot, $configFile );
|
||||||
$session->user( { userId => 3 } );
|
$session->user( { userId => 3 } );
|
||||||
|
|
@ -98,6 +107,24 @@ else {
|
||||||
$session->var->end;
|
$session->var->end;
|
||||||
$session->close;
|
$session->close;
|
||||||
|
|
||||||
|
#-------------------------------------------------
|
||||||
|
sub readLines {
|
||||||
|
my $file = shift;
|
||||||
|
my @lines;
|
||||||
|
if (open(my $fh, '<', $file)) {
|
||||||
|
while (my $line = <$fh>) {
|
||||||
|
$line =~ s/#.*//;
|
||||||
|
$line =~ s/^\s+//;
|
||||||
|
$line =~ s/\s+$//;
|
||||||
|
next if !$line;
|
||||||
|
push @lines, $line;
|
||||||
|
}
|
||||||
|
close $fh;
|
||||||
|
}
|
||||||
|
return @lines;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue