Prevent head tags from appearing twice in wobjects.

prepareView sets the extra head tags.  Have all wobjects, in their www_view method,
tell processStyle not to set the extra head tags again.
This commit is contained in:
Colin Kuskie 2009-06-01 02:03:05 +00:00
parent aab891a5b6
commit 76b9f01e77
6 changed files with 6 additions and 5 deletions

View file

@ -5,6 +5,7 @@
- fixed: Template parser cannot be set
- fixed #10361: Shortcuts duplicate extra header tags
- fixed #10356: SQL report is cached too long
- fixed #10313: extra head elements appear twice
7.7.8
- fixed: Basic Auth doesn't work if password contains colon (Arjan Widlak,

View file

@ -557,7 +557,7 @@ sub www_view {
});
}
$self->prepareView;
my $style = $self->processStyle($self->getSeparator);
my $style = $self->processStyle($self->getSeparator, { noHeadTags => 1 });
my ($head, $foot) = split($self->getSeparator,$style);
$self->session->output->print($head, 1);
$self->session->output->print($self->view);

View file

@ -365,7 +365,7 @@ sub www_view {
}
$self->logView();
$self->prepareView;
my $style = $self->processStyle($self->view);
my $style = $self->processStyle($self->view, { noHeadTags => 1});
}

View file

@ -1599,7 +1599,7 @@ sub www_process {
if (@errors) {
$var->{error_loop} = \@errors;
$self->prepareViewForm;
return $self->processStyle($self->viewForm($var, $entry));
return $self->processStyle($self->viewForm($var, $entry), { noHeadTags => 1 });
}
# Send email

View file

@ -445,7 +445,7 @@ sub www_view {
return $output;
} else {
$self->session->http->sendHeader;
my $style = $self->processStyle($self->getSeparator);
my $style = $self->processStyle($self->getSeparator, { noHeadTags => 1 });
my ($head, $foot) = split($self->getSeparator,$style);
$self->session->output->print($head);
$self->session->output->print($output, 1); # Do not process macros

View file

@ -368,7 +368,7 @@ sub www_view {
unless ($out) {
$self->prepareView;
$session->stow->set("cacheFixOverride", 1);
$out = $self->processStyle($self->view);
$out = $self->processStyle($self->view, { noHeadTags => 1 });
$cache->set($out, 60);
$session->stow->delete("cacheFixOverride");
}