fix [ 1488556 ] blank page after setup
This commit is contained in:
parent
aea9ce76f7
commit
6ba68835e0
5 changed files with 21 additions and 17 deletions
|
|
@ -28,6 +28,8 @@
|
|||
- fix [ 1488850 ] Collaboration front page slow to load
|
||||
- The CS main listing is now 863% faster.
|
||||
- Fixed a problem where last reply column wasn't being updated in the thread.
|
||||
- fix [ 1488556 ] blank page after setup
|
||||
|
||||
|
||||
6.99.0
|
||||
- Added an Events Management System asset that can help people run
|
||||
|
|
|
|||
|
|
@ -255,8 +255,7 @@ The current WebGUI::Session object.
|
|||
sub setup {
|
||||
my $session = shift;
|
||||
require WebGUI::Operation::WebGUI;
|
||||
$session->http->sendHeader;
|
||||
$session->output->print(WebGUI::Operation::WebGUI::www_setup($session));
|
||||
WebGUI::Operation::WebGUI::www_setup($session);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@ sub www_genesis {
|
|||
return $output;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
=head2 www_setup ( )
|
||||
|
||||
Initial setup for a brand new WebGUI install. Sets the administrator name,
|
||||
|
|
@ -49,11 +50,8 @@ password and email address, as well as some other WebGUI settings.
|
|||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub www_setup {
|
||||
my $session = shift;
|
||||
$session->http->setCacheControl("none");
|
||||
$session->http->setMimeType("text/html");
|
||||
return "" unless ($session->setting->get("specialState") eq "init");
|
||||
my $i18n = WebGUI::International->new($session, "WebGUI");
|
||||
my $output = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
|
|
@ -109,7 +107,7 @@ sub www_setup {
|
|||
$session->setting->set('companyEmail',$session->form->email("companyEmail"));
|
||||
$session->http->setRedirect($session->url->gateway());
|
||||
$session->http->sendHeader;
|
||||
return "";
|
||||
return undef;
|
||||
} else {
|
||||
$output .= '<legend align="left">Admin Account</legend>';
|
||||
my $u = WebGUI::User->new($session,'3');
|
||||
|
|
@ -148,7 +146,10 @@ sub www_setup {
|
|||
<img src="'.$session->url->extras('background.jpg').'" style="border-style:none;position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 5;" />
|
||||
</body>
|
||||
</html>';
|
||||
return $output;
|
||||
$session->http->setCacheControl("none");
|
||||
$session->http->setMimeType("text/html");
|
||||
$session->http->sendHeader;
|
||||
$session->output->print($output);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -119,13 +119,13 @@ sub new {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 param ( field )
|
||||
=head2 param ( [ field ] )
|
||||
|
||||
Retrieves a form field post from the HTTP request.
|
||||
Returns all the fields from a form post as an array.
|
||||
|
||||
=head3 field
|
||||
|
||||
The name of the field to retrieve.
|
||||
The name of the field to retrieve if you want to retrieve just one specific field.
|
||||
|
||||
=cut
|
||||
|
||||
|
|
|
|||
|
|
@ -184,17 +184,18 @@ sub sendHeader {
|
|||
} else {
|
||||
$request->content_type($self->{_http}{mimetype} || "text/html");
|
||||
my $date = $self->session->datetime->epochToHuman(($self->{_http}{lastModified} || time()), "%W, %d %C %y %j:%m:%s %t");
|
||||
my $cc = $self->{_http}{cacheControl};
|
||||
$request->headers_out->set('Last-Modified' => $date);
|
||||
if ($self->{_http}{cacheControl} eq "none" || $self->session->setting->get("preventProxyCache") || ($self->{_http}{cacheControl} eq "" && $self->session->var->get("userId") ne "1")) {
|
||||
if ($cc eq "none" || $self->session->setting->get("preventProxyCache") || ($cc eq "" && $self->session->var->get("userId") ne "1")) {
|
||||
$request->headers_out->set("Cache-Control" => "private");
|
||||
$request->no_cache(1);
|
||||
} elsif ($self->{_http}{cacheControl} ne "" && $request->protocol =~ /(\d\.\d)/ && $1 >= 1.1){
|
||||
} elsif ($cc ne "" && $request->protocol =~ /(\d\.\d)/ && $1 >= 1.1){
|
||||
my $extras = "";
|
||||
$extras .= ", private" unless ($self->session->var->get("userId") eq "1");
|
||||
$request->headers_out->set('Cache-Control' => "max-age=" . $self->{_http}{cacheControl}.$extras);
|
||||
} elsif ($self->{_http}{cacheControl} ne "") {
|
||||
$request->headers_out->set('Cache-Control' => "max-age=" . $cc.$extras);
|
||||
} elsif ($cc ne "") {
|
||||
$request->headers_out->set("Cache-Control" => "private") unless ($self->session->var->get("userId") eq "1");
|
||||
my $date = $self->session->datetime->epochToHuman(time() + $self->{_http}{cacheControl}, "%W, %d %C %y %j:%m:%s %t");
|
||||
my $date = $self->session->datetime->epochToHuman(time() + $cc, "%W, %d %C %y %j:%m:%s %t");
|
||||
$request->headers_out->set('Expires' => $date);
|
||||
}
|
||||
if ($self->{_http}{filename}) {
|
||||
|
|
@ -234,7 +235,7 @@ Either the number of seconds until the cache expires, or the word "none" to disa
|
|||
sub setCacheControl {
|
||||
my $self = shift;
|
||||
my $timeout = shift;
|
||||
$self->{_http}{cacheControl};
|
||||
$self->{_http}{cacheControl} = $timeout;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -364,7 +365,8 @@ The URL to redirect to.
|
|||
sub setRedirect {
|
||||
my $self = shift;
|
||||
my $url = shift;
|
||||
return undef if ($url eq $self->session->url->page()); # prevent redirecting to self
|
||||
my @params = $self->session->form->param;
|
||||
return undef if ($url eq $self->session->url->page() && scalar(@params) < 1); # prevent redirecting to self
|
||||
$self->{_http}{location} = $url;
|
||||
$self->setStatus("302", "Redirect");
|
||||
$self->session->style->setMeta({"http-equiv"=>"refresh",content=>"0; URL=".$url});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue