X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FTemplates.pm;h=88b9b01687ad18a55204eea1099dce6a52639eb5;hb=f69ebeef6731c87ec22cea1885bf7e5a9ee91a26;hp=507e077fb3211a2ed0f482bbb49663c6bb3aee6b;hpb=374b6f4b9f33a776d04cdaa696b40e8e033dda32;p=koha_fer diff --git a/C4/Templates.pm b/C4/Templates.pm index 507e077fb3..88b9b01687 100644 --- a/C4/Templates.pm +++ b/C4/Templates.pm @@ -228,13 +228,15 @@ sub _get_template_file { sub gettemplate { - my ( $tmplbase, $interface, $query ) = @_; + my ( $tmplbase, $interface, $query, $is_plugin ) = @_; ($query) or warn "no query in gettemplate"; my $path = C4::Context->preference('intranet_includes') || 'includes'; $tmplbase =~ s/\.tmpl$/.tt/; my ($htdocs, $theme, $lang, $filename) = _get_template_file($tmplbase, $interface, $query); + $filename = $tmplbase if ( $is_plugin ); my $template = C4::Templates->new($interface, $filename, $tmplbase, $query); + # NOTE: Commenting these out rather than deleting them so that those who need # to know how we previously shimmed these directories will be able to understand. # my $is_intranet = $interface eq 'intranet'; @@ -305,6 +307,7 @@ sub setlanguagecookie { my $cookie = $query->cookie( -name => 'KohaOpacLanguage', -value => $language, + -HttpOnly => 1, -expires => '+3y' ); print $query->redirect(