Able to call haspermission w/o $dbh, and add error msg on deletemember.
[koha.git] / C4 / Output.pm
index d4ae30f..aed50ec 100644 (file)
@@ -81,7 +81,7 @@ sub gettemplate {
     my ( $theme, $lang ) = themelanguage( $htdocs, $tmplbase, $interface, $query );
     my $opacstylesheet = C4::Context->preference('opacstylesheet');
     my $template       = HTML::Template::Pro->new(
-        filename          => "$htdocs/$theme/$lang/".($interface eq 'intranet'?"modules":"")."/$tmplbase",
+        filename          => "$htdocs/$theme/$lang/modules/$tmplbase",
         die_on_bad_params => 1,
         global_vars       => 1,
         case_sensitive    => 1,
@@ -143,7 +143,7 @@ sub themelanguage {
         foreach my $la (@languages) {
             for ( my $pass = 1 ; $pass <= 2 ; $pass += 1 ) {
                 $la =~ s/([-_])/ $1 eq '-'? '_': '-' /eg if $pass == 2;
-                if ( -e "$htdocs/$th/$la/".($section eq 'intranet'?"modules":"")."/$tmpl" ) {
+                if ( -e "$htdocs/$th/$la/modules/$tmpl" ) {
                     $theme = $th;
                     $lang  = $la;
                     last THEME;
@@ -328,6 +328,8 @@ sub output_html_with_http_headers ($$$) {
         -type    => 'text/html',
         -charset => 'UTF-8',
         -cookie  => $cookie,
+               -Pragma => 'no-cache',
+               -'Cache-Control' => 'no-cache',
     ), $html;
 }