Bugzilla – Attachment 27331 Details for
Bug 9915
Allow opac/svc/report to be passed sql parameters
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12114: Fix encoding problem with reports JSON web service (opac)
Bug-12114-Fix-encoding-problem-with-reports-JSON-w.patch (text/plain), 1.58 KB, created by
Katrin Fischer
on 2014-04-20 22:09:46 UTC
(
hide
)
Description:
Bug 12114: Fix encoding problem with reports JSON web service (opac)
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-20 22:09:46 UTC
Size:
1.58 KB
patch
obsolete
>From f4f1f6cba38227e1cfc12247d0520419e94077fc Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <Katrin.Fischer.83@web.de> >Date: Mon, 21 Apr 2014 00:01:19 +0200 >Subject: [PATCH] Bug 12114: Fix encoding problem with reports JSON web service > (opac) >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >- catalog a record that includes umlauts äöü >- write a report, that has the record in the result set >- access the JSON output of the report > <OPAC BaseURL/cgi-bin/koha/svc/report?id=1 >- verify the umlaut displays not correctly >- switch the encoding in the browser to 'western'/latin1 >- verify the umlaut now displays correctly >- apply patch >- verify umlaut now displays correctly from the beginning > >Based on paste from Galen Charlton. > >http://bugs.koha-community.org/show_bug.cgi?id=9915 >--- > opac/svc/report | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/opac/svc/report b/opac/svc/report >index 1ded9c9..0b17a4d 100755 >--- a/opac/svc/report >+++ b/opac/svc/report >@@ -24,7 +24,7 @@ > use Modern::Perl; > > use C4::Reports::Guided; >-use JSON; >+use JSON::XS; > use CGI; > > use Koha::Cache; >@@ -70,7 +70,7 @@ unless ($json_text) { > else { > $lines = $sth->fetchall_arrayref; > } >- $json_text = to_json($lines); >+ $json_text = encode_json($lines); > > if ($cache_active) { > $cache->set_in_cache( $cache_key, $json_text, >@@ -78,7 +78,7 @@ unless ($json_text) { > } > } > else { >- $json_text = to_json($errors); >+ $json_text = encode_json($errors); > } > } > >-- >1.8.3.2
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 9915
:
16830
|
25918
|
25957
|
27316
|
27327
|
27328
|
27330
|
27331
|
27332