config file updates

This commit is contained in:
JT Smith 2005-11-18 14:34:27 +00:00
parent f98ac111f9
commit 9c8f46177a
2 changed files with 20 additions and 4 deletions

View file

@ -19,10 +19,6 @@ save you many hours of grief.
* The core API has changed. Check docs/migration.txt for details.
* Due to the performance increase achieved by switching to DateTime we
no longer need date caching so the enableDateCache directive can
be removed from your config file.
* WebGUI now requires Apache2 with mod_perl2 so CGI, FastCGI, PerlEx,
although never officially supported, are no longer possible.
Making this change gave us more than 70% performance improvement

View file

@ -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);