Bugzilla – Attachment 28131 Details for
Bug 12065
Consistent use of encode_qp when sending basket/shelf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12065: Consistent use of encode_qp when sending basket/shelf
PASSED-QA-Bug-12065-Consistent-use-of-encodeqp-whe.patch (text/plain), 4.29 KB, created by
Kyle M Hall (khall)
on 2014-05-09 13:16:53 UTC
(
hide
)
Description:
[PASSED QA] Bug 12065: Consistent use of encode_qp when sending basket/shelf
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2014-05-09 13:16:53 UTC
Size:
4.29 KB
patch
obsolete
>From 75ce35aa6e6a58c330ec8d0e2488fa048decdae9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 10 Apr 2014 14:40:01 +0200 >Subject: [PATCH] [PASSED QA] Bug 12065: Consistent use of encode_qp when sending basket/shelf > >QP-encode both mail header and mail body when sending baskets or shelves. >There is no need to Encode qp-encoded strings. >Note that this does not solve all possible encoding problems in the mail >sent. This is related to decoding CGI parameters and use of TT. That problem >is addressed in report 11944. > >Test plan: >Verify if sending a basket from opac and staff still works. >Check if sending a shelf (list) from opac and staff still functions as expected. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> >Cart/List sent form opac/staff works >No koha-qa errors > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > basket/sendbasket.pl | 12 +++--------- > opac/opac-sendbasket.pl | 3 ++- > opac/opac-sendshelf.pl | 3 ++- > virtualshelves/sendshelf.pl | 3 ++- > 4 files changed, 9 insertions(+), 12 deletions(-) > >diff --git a/basket/sendbasket.pl b/basket/sendbasket.pl >index 885ee41..40547f0 100755 >--- a/basket/sendbasket.pl >+++ b/basket/sendbasket.pl >@@ -122,6 +122,7 @@ if ( $email_add ) { > if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { > $email_header = $1; > $email_header =~ s|\n?(.*)\n?|$1|; >+ $email_header = encode_qp($email_header); > } > > my $email_file = "basket.txt"; >@@ -133,19 +134,12 @@ if ( $email_add ) { > if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { > $body = $1; > $body =~ s|\n?(.*)\n?|$1|; >- $body = encode("UTF-8", encode_qp($body)); >+ $body = encode_qp($body); > } > > my $boundary = "====" . time() . "===="; > >- # $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; >- # >- # $email_header = encode_qp($email_header); >- # >- # $boundary = "--".$boundary; >- # >- # # Writing mail >- # $mail{body} = >+ # Writing mail > $mail{'content-type'} = "multipart/mixed; boundary=\"$boundary\""; > my $isofile = encode_base64(encode("UTF-8", $iso2709)); > $boundary = '--' . $boundary; >diff --git a/opac/opac-sendbasket.pl b/opac/opac-sendbasket.pl >index ca3a973..5821bea 100755 >--- a/opac/opac-sendbasket.pl >+++ b/opac/opac-sendbasket.pl >@@ -138,6 +138,7 @@ if ( $email_add ) { > if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { > $email_header = $1; > $email_header =~ s|\n?(.*)\n?|$1|; >+ $email_header = encode_qp($email_header); > } > > my $email_file = "basket.txt"; >@@ -149,7 +150,7 @@ if ( $email_add ) { > if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { > $body = $1; > $body =~ s|\n?(.*)\n?|$1|; >- $body = encode("UTF-8", encode_qp($body)); >+ $body = encode_qp($body); > } > > $mail{body} = $body; >diff --git a/opac/opac-sendshelf.pl b/opac/opac-sendshelf.pl >index 3f9b719..852ef8d 100755 >--- a/opac/opac-sendshelf.pl >+++ b/opac/opac-sendshelf.pl >@@ -135,6 +135,7 @@ if ( $email ) { > if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { > $email_header = $1; > $email_header =~ s|\n?(.*)\n?|$1|; >+ $email_header = encode_qp($email_header); > } > > my $email_file = "list.txt"; >@@ -146,7 +147,7 @@ if ( $email ) { > if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { > $body = $1; > $body =~ s|\n?(.*)\n?|$1|; >- $body = encode("UTF-8", encode_qp($body)); >+ $body = encode_qp($body); > } > > my $boundary = "====" . time() . "===="; >diff --git a/virtualshelves/sendshelf.pl b/virtualshelves/sendshelf.pl >index cc3afde..9866671 100755 >--- a/virtualshelves/sendshelf.pl >+++ b/virtualshelves/sendshelf.pl >@@ -126,6 +126,7 @@ if ( $email ) { > if ( $template_res =~ /<HEADER>(.*)<END_HEADER>/s ) { > $email_header = $1; > $email_header =~ s|\n?(.*)\n?|$1|; >+ $email_header = encode_qp($email_header); > } > > my $email_file = "list.txt"; >@@ -137,7 +138,7 @@ if ( $email ) { > if ( $template_res =~ /<MESSAGE>(.*)<END_MESSAGE>/s ) { > $body = $1; > $body =~ s|\n?(.*)\n?|$1|; >- $body = encode("UTF-8", encode_qp($body)); >+ $body = encode_qp($body); > } > > my $boundary = "====" . time() . "===="; >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 12065
:
26975
|
27362
|
27743
| 28131