fixed a couple bugs and added size aware file cache

This commit is contained in:
JT Smith 2005-07-07 19:53:19 +00:00
parent cb2bf8dcaf
commit d72dd21826
9 changed files with 87 additions and 12 deletions

View file

@ -432,6 +432,8 @@ $sth->finish;
print "\tConverting collateral manager items into assets\n" unless ($quiet);
WebGUI::SQL->write("update collateral set collateralFolderId='0' where collateralFolderId=''");
WebGUI::SQL->write("update collateral set collateralFolderId='0' where collateralFolderId is null");
my $collateralRootLineage = getNextLineage('PBasset000000000000002');
my $collateralRootId = WebGUI::SQL->setRow("asset","assetId",{
assetId=>"new",
@ -500,7 +502,7 @@ my $lastCollateralFolderId = 'nolastid';
my ($parentId, $baseLineage);
my $sth = WebGUI::SQL->read("select * from collateral order by collateralFolderId");
while (my $data = $sth->hashRef) {
next if ($data->{filename} eq "");
next if ($data->{filename} eq "" && $data->{collateralType} ne "snippet");
print "\t\tConverting collateral item ".$data->{collateralId}." for folder ".$data->{collateralFolderId}."\n" unless ($quiet);
unless ($lastCollateralFolderId eq $data->{collateralFolderId}) {
my $id = $data->{collateralFolderId};

View file

@ -21,12 +21,29 @@ GetOptions(
WebGUI::Session::open("../..",$configFile);
addAssetVersioning();
updateConfigFile();
insertHelpTemplate();
insertXSLTSheets();
insertSyndicatedContentTemplate();
WebGUI::Session::close();
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 ($key eq "wobject") {
$newConfig{$key} = $conf->get($key);
}
}
$newConfig{fileCacheSizeLimit} = 100000000;
$conf->purge;
$conf->set(%newConfig);
$conf->write;
}
sub addAssetVersioning {
print "\tMaking changes for asset versioning\n" unless ($quiet);
WebGUI::SQL->write("create table assetVersionTag (