Bug 24151: Add tests
[srvgit] / opac / opac-sendbasket.pl
index 2afebc7..d5e6c7f 100755 (executable)
@@ -133,7 +133,7 @@ if ( $email_add ) {
     if ( $template_res =~ /<SUBJECT>(.*)<END_SUBJECT>/s ) {
         $mail{subject} = $1;
         $mail{subject} =~ s|\n?(.*)\n?|$1|;
-        $mail{subject} = Encode::encode("UTF-8", $mail{subject});
+        $mail{subject} = encode('MIME-Header',$mail{subject});
     }
     else { $mail{'subject'} = "no subject"; }
 
@@ -192,7 +192,7 @@ END_OF_BODY
         $template->param( error => 1 );
     }
     $template->param( email_add => $email_add );
-    output_html_with_http_headers $query, $cookie, $template->output;
+    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
 }
 else {
     my $new_session_id = $cookie->value;
@@ -204,5 +204,5 @@ else {
         csrf_token => Koha::Token->new->generate_csrf(
             { session_id => $new_session_id, } ),
     );
-    output_html_with_http_headers $query, $cookie, $template->output;
+    output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 };
 }