config file updates
This commit is contained in:
parent
f98ac111f9
commit
9c8f46177a
2 changed files with 20 additions and 4 deletions
|
|
@ -13,11 +13,13 @@ use strict;
|
|||
use FileHandle;
|
||||
use File::Copy qw(cp);
|
||||
use Getopt::Long;
|
||||
use Parse::PlainConfig;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
use WebGUI::Asset;
|
||||
use WebGUI::Setting;
|
||||
use WebGUI::User;
|
||||
use WebGUI::Utility;
|
||||
|
||||
my $toVersion = "6.8.0";
|
||||
my $configFile;
|
||||
|
|
@ -36,8 +38,26 @@ addEnableAvatarColumn();
|
|||
addSpectre();
|
||||
addWorkflow();
|
||||
addMatrix();
|
||||
updateConfigFile();
|
||||
finish();
|
||||
|
||||
#-------------------------------------------------
|
||||
sub updateConfigFile {
|
||||
print "\tUpdating config file.\n" unless ($quiet);
|
||||
my $pathToConfig = '../../etc/'.$configFile;
|
||||
my $conf = Parse::PlainConfig->new('DELIM' => '=', 'FILE' => $pathToConfig, 'PURGE'=>1);
|
||||
my %newConfig;
|
||||
foreach my $key ($conf->directives) { # delete unwanted stuff
|
||||
unless (isIn($key,qw(enableDateCache scripturl))) {
|
||||
$newConfig{$key} = $conf->get($key);
|
||||
}
|
||||
}
|
||||
push(@{$newConfig{assets}}, "WebGUI::Asset::Wobject::Matrix");
|
||||
$conf->purge;
|
||||
$conf->set(%newConfig);
|
||||
$conf->write;
|
||||
}
|
||||
|
||||
#-------------------------------------------------
|
||||
sub addMatrix {
|
||||
print "\tAdding Matrix Asset\n" unless ($quiet);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue