Bugzilla – Attachment 126449 Details for
Bug 26314
"Volumes: show volumes" showing regardless of whether there are volumes linked to the record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26314: (follow-up) Use clean_search_term
Bug-26314-follow-up-Use-cleansearchterm.patch (text/plain), 1.16 KB, created by
Martin Renvoize (ashimema)
on 2021-10-18 17:13:36 UTC
(
hide
)
Description:
Bug 26314: (follow-up) Use clean_search_term
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-10-18 17:13:36 UTC
Size:
1.16 KB
patch
obsolete
>From b60e24197393302baf089e5ecf1f205248e56b86 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Wed, 1 Sep 2021 16:12:18 +0100 >Subject: [PATCH] Bug 26314: (follow-up) Use clean_search_term > >This patch uses the now public clean_search_term from bug 28316 to >sanitize the title string and prevent crashes in elastic search when >title contain reserved characters. >--- > Koha/Biblio.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/Koha/Biblio.pm b/Koha/Biblio.pm >index f90063352d..c7d78b4379 100644 >--- a/Koha/Biblio.pm >+++ b/Koha/Biblio.pm >@@ -976,6 +976,8 @@ Returns a query which can be used to search for all component parts of MARC21 bi > sub get_volumes_query { > my ($self) = @_; > >+ my $builder = Koha::SearchEngine::QueryBuilder->new( >+ { index => $Koha::SearchEngine::BIBLIOS_INDEX } ); > my $marc = $self->metadata->record; > > my $searchstr; >@@ -1006,6 +1008,7 @@ sub get_volumes_query { > else { > my $cleaned_title = $marc->title; > $cleaned_title =~ tr|/||; >+ $cleaned_title = $builder->clean_search_term($cleaned_title); > $searchstr = "ti,phr:($cleaned_title)"; > } > >-- >2.20.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 26314
:
123615
|
124367
|
124380
|
124381
|
126448
|
126449
|
126450
|
126952
|
126953
|
126954
|
126955
|
155437
|
155438
|
155439
|
155440
|
155441
|
155446
|
155447
|
155448
|
155449
|
155450
|
155670
|
155671
|
155672
|
155673
|
155674
|
155675
|
155676
|
155677
|
155678
|
155679
|
155680
|
155681
|
162163
|
162164