Fix visitorCacheTimeout usage in the Thread and Event assets. Fixes bug #12309.
This commit is contained in:
parent
ce327bd49a
commit
fd98df41d3
3 changed files with 19 additions and 17 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
- fixed Passive Analytics, UI, Progress Bar, server load.
|
- fixed Passive Analytics, UI, Progress Bar, server load.
|
||||||
- fixed #12303: Survey custom multiple choice question types
|
- fixed #12303: Survey custom multiple choice question types
|
||||||
- fixed #12304: Surven packages do not include custom question types
|
- fixed #12304: Surven packages do not include custom question types
|
||||||
|
- fixed #12309: Some child assets ignore visitor cache timeouts
|
||||||
|
|
||||||
7.10.23
|
7.10.23
|
||||||
- fixed #12225: Stock asset, multiple instances on a page
|
- fixed #12225: Stock asset, multiple instances on a page
|
||||||
|
|
|
||||||
|
|
@ -2475,10 +2475,11 @@ sub www_view {
|
||||||
return $self->session->privilege->noAccess() unless $self->canView;
|
return $self->session->privilege->noAccess() unless $self->canView;
|
||||||
my $check = $self->checkView;
|
my $check = $self->checkView;
|
||||||
return $check if (defined $check);
|
return $check if (defined $check);
|
||||||
$self->session->http->setCacheControl($self->get("visitorCacheTimeout")) if ($self->session->user->isVisitor);
|
my $calendar = $self->getParent;
|
||||||
|
$self->session->http->setCacheControl($calendar->get("visitorCacheTimeout")) if ($self->session->user->isVisitor);
|
||||||
$self->session->http->sendHeader;
|
$self->session->http->sendHeader;
|
||||||
$self->prepareView;
|
$self->prepareView;
|
||||||
my $style = $self->getParent->processStyle($self->getSeparator);
|
my $style = $calendar->processStyle($self->getSeparator);
|
||||||
my ($head, $foot) = split($self->getSeparator,$style);
|
my ($head, $foot) = split($self->getSeparator,$style);
|
||||||
$self->session->output->print($head,1);
|
$self->session->output->print($head,1);
|
||||||
$self->session->output->print($self->view);
|
$self->session->output->print($self->view);
|
||||||
|
|
|
||||||
|
|
@ -1477,20 +1477,21 @@ Renders self->view based upon current style, subject to timeouts. Returns Privil
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub www_view {
|
sub www_view {
|
||||||
my $self = shift;
|
my $self = shift;
|
||||||
my $currentPost = shift;
|
my $currentPost = shift;
|
||||||
return $self->session->privilege->noAccess() unless $self->canView;
|
return $self->session->privilege->noAccess() unless $self->canView;
|
||||||
my $check = $self->checkView;
|
my $check = $self->checkView;
|
||||||
return $check if (defined $check);
|
return $check if (defined $check);
|
||||||
$self->session->http->setCacheControl($self->get("visitorCacheTimeout")) if ($self->session->user->isVisitor);
|
my $cs = $self->getParent;
|
||||||
$self->session->http->sendHeader;
|
$self->session->http->setCacheControl($cs->get("visitorCacheTimeout")) if ($self->session->user->isVisitor);
|
||||||
$self->prepareView;
|
$self->session->http->sendHeader;
|
||||||
my $style = $self->getParent->processStyle($self->getSeparator);
|
$self->prepareView;
|
||||||
my ($head, $foot) = split($self->getSeparator,$style);
|
my $style = $cs->processStyle($self->getSeparator);
|
||||||
$self->session->output->print($head,1);
|
my ($head, $foot) = split($self->getSeparator,$style);
|
||||||
$self->session->output->print($self->view($currentPost));
|
$self->session->output->print($head,1);
|
||||||
$self->session->output->print($foot,1);
|
$self->session->output->print($self->view($currentPost));
|
||||||
return "chunked";
|
$self->session->output->print($foot,1);
|
||||||
|
return "chunked";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue