Override templateDir before calling sendHtml (fixes: #1642)
This commit is contained in:
parent
24ef6d3905
commit
f8942d156d
|
@ -241,7 +241,7 @@ sub sendHtml {
|
|||
$args{code} ||= 200;
|
||||
$args{headers} ||= $req->respHeaders || [];
|
||||
my $htpl;
|
||||
$template = $self->templateDir . "/$template.tpl";
|
||||
$template = ( $args{templateDir} // $self->templateDir ) . "/$template.tpl";
|
||||
return $self->sendError( $req, "Unable to read $template", 500 )
|
||||
unless ( -r $template and -f $template );
|
||||
eval {
|
||||
|
|
|
@ -730,6 +730,8 @@ sub _dump {
|
|||
sub sendHtml {
|
||||
my ( $self, $req, $template, %args ) = @_;
|
||||
$args{params}->{TROVER} = $self->trOver;
|
||||
$args{templateDir} =
|
||||
$self->conf->{templateDir} . '/' . $self->getSkin($req);
|
||||
my $res = $self->SUPER::sendHtml( $req, $template, %args );
|
||||
push @{ $res->[1] },
|
||||
'X-XSS-Protection' => '1; mode=block',
|
||||
|
|
Loading…
Reference in New Issue
Block a user