lots of bug fixes and a new upgrade feature

This commit is contained in:
JT Smith 2005-02-17 01:11:11 +00:00
parent 5e9652d873
commit c76829a4e3
8 changed files with 97 additions and 18 deletions

View file

@ -53,6 +53,20 @@ sub _processOperations {
return $output;
}
#-------------------------------------------------------------------
sub _upgrading {
my $webguiRoot = shift;
my $output = WebGUI::HTTP::getHeader();
open(FILE,"<".$webguiRoot."/docs/maintenance.html");
while (<FILE>) {
$output .= $_;
}
close(FILE);
WebGUI::Session::close();
return $output;
}
#-------------------------------------------------------------------
sub page {
my $webguiRoot = shift;
@ -61,6 +75,7 @@ sub page {
my $assetUrl = shift;
my $fastcgi = shift;
WebGUI::Session::open($webguiRoot,$configFile,$fastcgi) unless ($useExistingSession);
return _upgrading($webguiRoot) if ($session{setting}{specialState} eq "upgrading");
my $output = _processOperations();
if ($output eq "") {
my $asset = WebGUI::Asset->newByUrl($assetUrl);