Bugzilla – Attachment 135807 Details for
Bug 30844
The OPAC detail page's browser is limited to the current page of results when using Elasticsearch
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30844: Use XML::Dumper instead of JSON to allow encoding scalar queries
Bug-30844-Use-XMLDumper-instead-of-JSON-to-allow-e.patch (text/plain), 2.36 KB, created by
Kevin Carnes
on 2022-06-08 13:38:02 UTC
(
hide
)
Description:
Bug 30844: Use XML::Dumper instead of JSON to allow encoding scalar queries
Filename:
MIME Type:
Creator:
Kevin Carnes
Created:
2022-06-08 13:38:02 UTC
Size:
2.36 KB
patch
obsolete
>From 808a0f0ca6432d2778183ef1a4c15d9981c4a790 Mon Sep 17 00:00:00 2001 >From: Kevin Carnes <kevin.carnes@ub.lu.se> >Date: Wed, 8 Jun 2022 13:35:50 +0000 >Subject: [PATCH] Bug 30844: Use XML::Dumper instead of JSON to allow encoding > scalar queries > >--- > opac/opac-detail.pl | 4 ++-- > opac/opac-search.pl | 3 ++- > 2 files changed, 4 insertions(+), 3 deletions(-) > >diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl >index f6b713542d..bff3baf2ce 100755 >--- a/opac/opac-detail.pl >+++ b/opac/opac-detail.pl >@@ -86,7 +86,7 @@ use Koha::Reviews; > use Koha::SearchEngine::Search; > use Koha::SearchEngine::QueryBuilder; > >-use JSON qw( decode_json ); >+use XML::Dumper; > > my $query = CGI->new(); > >@@ -250,7 +250,7 @@ if ($session->param('busc')) { > eval { > my $searcher = Koha::SearchEngine::Search->new( > { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); >- ($error, $results_hashref, $facets) = $searcher->search_compat(decode_json($arrParamsBusc->{'query'}),$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'}); >+ ($error, $results_hashref, $facets) = $searcher->search_compat(xml2pl($arrParamsBusc->{'query'}),$arrParamsBusc->{'simple_query'},\@sort_by,\@servers,$results_per_page,$offset,undef,$itemtypes,$arrParamsBusc->{'query_type'},$arrParamsBusc->{'scan'}); > }; > my $hits; > my @newresults; >diff --git a/opac/opac-search.pl b/opac/opac-search.pl >index a1f0a14487..2da8d4f20f 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -69,6 +69,7 @@ use POSIX qw(ceil floor strftime); > use URI::Escape; > use JSON qw/decode_json encode_json/; > use Business::ISBN; >+use XML::Dumper; > > my $DisplayMultiPlaceHold = C4::Context->preference("DisplayMultiPlaceHold"); > # create a new CGI object >@@ -561,7 +562,7 @@ if ($tag) { > # displays search results which should be hidden. > # FIXME: No facets for tags search. > } else { >- $pasarParams .= '&query=' . uri_escape_utf8(encode_json($query)); >+ $pasarParams .= '&query=' . uri_escape_utf8(pl2xml($query)); > $pasarParams .= '&count=' . uri_escape_utf8($results_per_page); > $pasarParams .= '&simple_query=' . uri_escape_utf8($simple_query); > $pasarParams .= '&query_type=' . uri_escape_utf8($query_type) if ($query_type); >-- >2.17.1
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 30844
:
135336
|
135456
|
135727
|
135807
|
135852
|
135853