Merge branch 'WebGUI8' of github.com:plainblack/webgui into 8
Conflicts: lib/WebGUI.pm lib/WebGUI/Auth/WebGUI.pm sbin/findBrokenAssets.pl sbin/testEnvironment.pl
This commit is contained in:
commit
677ac978b6
89 changed files with 1064 additions and 448 deletions
|
|
@ -433,7 +433,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->cacheTimeout);
|
||||
$self->session->response->setCacheControl($self->cacheTimeout);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1885,7 +1885,7 @@ Extend the base method to handle the visitor cache timeout.
|
|||
sub www_view {
|
||||
my $self = shift;
|
||||
my $disableCache = ($self->session->form->process("sortBy") ne "");
|
||||
$self->session->http->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor && !$disableCache);
|
||||
$self->session->response->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor && !$disableCache);
|
||||
return $self->next::method(@_);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -611,10 +611,10 @@ sub www_view {
|
|||
if ($self->state eq "published") { # no privileges, make em log in
|
||||
return $self->session->privilege->noAccess();
|
||||
} elsif ($self->session->isAdminOn && $self->state =~ /^trash/) { # show em trash
|
||||
$self->session->http->setRedirect($self->getUrl("func=manageTrash"));
|
||||
$self->session->response->setRedirect($self->getUrl("func=manageTrash"));
|
||||
return undef;
|
||||
} elsif ($self->session->isAdminOn && $self->state =~ /^clipboard/) { # show em clipboard
|
||||
$self->session->http->setRedirect($self->getUrl("func=manageClipboard"));
|
||||
$self->session->response->setRedirect($self->getUrl("func=manageClipboard"));
|
||||
return undef;
|
||||
} else { # tell em it doesn't exist anymore
|
||||
$self->session->response->status(410);
|
||||
|
|
|
|||
|
|
@ -1341,7 +1341,7 @@ sub viewForm {
|
|||
}
|
||||
$var = $passedVars || $self->getRecordTemplateVars($var, $entry);
|
||||
if ($self->hasCaptcha) {
|
||||
$self->session->http->setCacheControl('none');
|
||||
$self->session->response->setCacheControl('none');
|
||||
}
|
||||
return $self->processTemplate($var, undef, $self->{_viewFormTemplate});
|
||||
}
|
||||
|
|
@ -1891,7 +1891,7 @@ sub www_exportTab {
|
|||
|
||||
$session->response->header( 'Content-Disposition' => qq{attachment; filename="}.$self->url.'.tab"');
|
||||
$session->response->content_type('text/plain');
|
||||
$session->http->sendHeader;
|
||||
$session->response->sendHeader;
|
||||
$session->output->print($tsv->string, 1);
|
||||
|
||||
my $entryIter = $self->entryClass->iterateAll($self);
|
||||
|
|
|
|||
|
|
@ -336,7 +336,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor);
|
||||
$self->session->response->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -837,8 +837,8 @@ sub sendChunkedContent {
|
|||
|
||||
my $session = $self->session;
|
||||
|
||||
$session->http->setLastModified($self->getContentLastModified);
|
||||
$session->http->sendHeader;
|
||||
$session->response->setLastModified($self->getContentLastModified);
|
||||
$session->response->sendHeader;
|
||||
my $style = $self->processStyle($self->getSeparator);
|
||||
my ($head, $foot) = split($self->getSeparator,$style);
|
||||
$session->output->print($head, 1);
|
||||
|
|
|
|||
|
|
@ -497,7 +497,7 @@ sub www_view {
|
|||
if ($self->session->response->content_type ne "text/html") {
|
||||
return $output;
|
||||
} else {
|
||||
$self->session->http->sendHeader;
|
||||
$self->session->response->sendHeader;
|
||||
my $style = $self->processStyle($self->getSeparator, { noHeadTags => 1 });
|
||||
my ($head, $foot) = split($self->getSeparator,$style);
|
||||
$self->session->output->print($head);
|
||||
|
|
|
|||
|
|
@ -426,8 +426,8 @@ override www_view => sub {
|
|||
my $ad = $adSpace->displayImpression if (defined $adSpace);
|
||||
$out =~ s/\Q$code/$ad/ges;
|
||||
}
|
||||
$session->http->setLastModified($self->getContentLastModified);
|
||||
$session->http->sendHeader;
|
||||
$session->response->setLastModified($self->getContentLastModified);
|
||||
$session->response->sendHeader;
|
||||
$session->output->print($out, 1);
|
||||
return "chunked";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1080,7 +1080,7 @@ sub www_exportAttributes {
|
|||
|
||||
$session->response->header( 'Content-Disposition' => qq{attachment; filename="export_matrix_attributes.csv"});
|
||||
$session->response->content_type('application/octet-stream');
|
||||
$self->session->http->sendHeader;
|
||||
$self->session->response->sendHeader;
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor);
|
||||
$self->session->response->setCacheControl($self->visitorCacheTimeout) if ($self->session->user->isVisitor);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->cacheTimeout);
|
||||
$self->session->response->setCacheControl($self->cacheTimeout);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -504,7 +504,7 @@ Do a redirect to the form parameter returnUrl if it exists.
|
|||
|
||||
sub www_goBackToPage {
|
||||
my $self = shift;
|
||||
$self->session->http->setRedirect($self->session->form->process("returnUrl")) if ($self->session->form->process("returnUrl"));
|
||||
$self->session->response->setRedirect($self->session->form->process("returnUrl")) if ($self->session->form->process("returnUrl"));
|
||||
return undef;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ sub www_download {
|
|||
$self->downloadType eq 'csv' ? "application/octet-stream" : $self->downloadMimeType
|
||||
);
|
||||
|
||||
$self->session->http->sendHeader;
|
||||
$self->session->response->sendHeader;
|
||||
|
||||
|
||||
return $self->download;
|
||||
|
|
@ -722,7 +722,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->cacheTimeout);
|
||||
$self->session->response->setCacheControl($self->cacheTimeout);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ See WebGUI::Asset::Wobject::www_view() for details.
|
|||
|
||||
override www_view => sub {
|
||||
my $self = shift;
|
||||
$self->session->http->setCacheControl($self->cacheTimeout);
|
||||
$self->session->response->setCacheControl($self->cacheTimeout);
|
||||
super();
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue