fixed #9623: preload.custom paths not included during upgrade
This commit is contained in:
parent
a8f3d2ea30
commit
787fe74ee1
2 changed files with 38 additions and 14 deletions
|
|
@ -15,6 +15,7 @@
|
|||
- fixed: Fixed bad gateway macros in the Matrix templates.
|
||||
- fixed #9535: Bad characters in dom element ids when generated from assetId
|
||||
- fixed #9542: Default WebGUI config contains invalid workflow activity
|
||||
- fixed #9623: preload.custom paths not included during upgrade
|
||||
|
||||
7.6.10
|
||||
- fixed #9577: WebGUI::Form::Url::getValue returns blank rather than undef for blank fields
|
||||
|
|
|
|||
|
|
@ -18,14 +18,21 @@ BEGIN {
|
|||
}
|
||||
|
||||
use strict;
|
||||
use DBI;
|
||||
use File::Path;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
use WebGUI::Config;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::Utility;
|
||||
use Cwd;
|
||||
use Cwd ();
|
||||
use File::Path ();
|
||||
use Getopt::Long ();
|
||||
use Pod::Usage ();
|
||||
|
||||
foreach my $libDir ( readLines( "$webguiRoot/sbin/preload.custom" ) ) {
|
||||
if ( !-d $libDir ) {
|
||||
warn "WARNING: Not adding lib directory '$libDir' from $webguiRoot/sbin/preload.custom: Directory does not exist.\n";
|
||||
next;
|
||||
}
|
||||
unshift @INC, $libDir;
|
||||
}
|
||||
|
||||
require WebGUI::Config;
|
||||
require WebGUI::Session;
|
||||
|
||||
my $help;
|
||||
my $history;
|
||||
|
|
@ -39,7 +46,7 @@ my $skipDelete;
|
|||
my $skipMaintenance;
|
||||
my $doit;
|
||||
|
||||
GetOptions(
|
||||
Getopt::Long::GetOptions(
|
||||
'help'=>\$help,
|
||||
'history'=>\$history,
|
||||
'override'=>\$override,
|
||||
|
|
@ -53,8 +60,8 @@ GetOptions(
|
|||
'skipbackup'=>\$skipBackup
|
||||
);
|
||||
|
||||
pod2usage( verbose => 2 ) if $help;
|
||||
pod2usage() unless $doit;
|
||||
Pod::Usage::pod2usage( verbose => 2 ) if $help;
|
||||
Pod::Usage::pod2usage() unless $doit;
|
||||
|
||||
unless ($doit) {
|
||||
print <<STOP;
|
||||
|
|
@ -135,10 +142,10 @@ foreach my $filename (keys %{$configs}) {
|
|||
unless ($skipDelete) {
|
||||
print "\tDeleting temp files.\n" unless ($quiet);
|
||||
my $path = $configs->{$filename}->get("uploadsPath").$slash."temp";
|
||||
rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
|
||||
File::Path::rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
|
||||
print "\tDeleting file cache.\n" unless ($quiet);
|
||||
$path = $configs->{$filename}->get("fileCacheRoot")||"/tmp/WebGUICache";
|
||||
rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
|
||||
File::Path::rmtree($path) unless ($path eq "" || $path eq "/" || $path eq "/data");
|
||||
}
|
||||
}
|
||||
$session->close();
|
||||
|
|
@ -193,7 +200,7 @@ print "\nREADY TO BEGIN UPGRADES\n" unless ($quiet);
|
|||
my $notRun = 1;
|
||||
|
||||
|
||||
my $currentPath = getcwd();
|
||||
my $currentPath = Cwd::getcwd();
|
||||
foreach my $filename (keys %config) {
|
||||
chdir($upgradesPath);
|
||||
my $clicmd = $config{$filename}{mysqlCLI} || $mysql;
|
||||
|
|
@ -370,6 +377,22 @@ sub _parseDSN {
|
|||
return $hash;
|
||||
}
|
||||
|
||||
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__
|
||||
|
||||
=head1 NAME
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue