Bugzilla – Attachment 138480 Details for
Bug 23919
Make ISSN searchable with and without hyphen
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23919: (QA follow-up) Tidy query build code
Bug-23919-QA-follow-up-Tidy-query-build-code.patch (text/plain), 1.66 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-08-01 16:56:54 UTC
(
hide
)
Description:
Bug 23919: (QA follow-up) Tidy query build code
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-08-01 16:56:54 UTC
Size:
1.66 KB
patch
obsolete
>From fa5f643000ebffda464fef611a0bf788900c369d Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Mon, 1 Aug 2022 13:55:35 -0300 >Subject: [PATCH] Bug 23919: (QA follow-up) Tidy query build code > >This is really opinionated, but I found this to be much cleaner to read >and thought it was worth pusing as well. > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > C4/Search.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Search.pm b/C4/Search.pm >index 6c7bdab426d..0ff4d2361eb 100644 >--- a/C4/Search.pm >+++ b/C4/Search.pm >@@ -1416,14 +1416,14 @@ sub buildQuery { > if ( $index eq 'nb' ) { > if ( C4::Context->preference("SearchWithISBNVariations") ) { > my @isbns = C4::Koha::GetVariationsOfISBN( $operand ); >- $operands[$i] = $operand = '(nb=' . join(' OR nb=', @isbns) . ')'; >+ $operands[$i] = $operand = '(' . join( ' OR ', map { 'nb=' . $_ } @isbns ) . ')'; > $indexes[$i] = $index = 'kw'; > } > } > if ( $index eq 'ns' ) { > if ( C4::Context->preference("SearchWithISSNVariations") ) { > my @issns = C4::Koha::GetVariationsOfISSN( $operand ); >- $operands[$i] = $operand = '(ns=' . join(' OR ns=', @issns) . ')'; >+ $operands[$i] = $operand = '(' . join( ' OR ', map { 'ns=' . $_ } @issns ) . ')'; > $indexes[$i] = $index = 'kw'; > } > } >-- >2.34.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 23919
:
134381
|
134382
|
134383
|
134384
|
134385
|
134422
|
134423
|
134424
|
134425
|
134426
|
134440
|
134441
|
134442
|
134443
|
134444
|
135288
|
135289
|
135290
|
135291
|
135292
|
138311
|
138312
|
138313
|
138314
|
138315
| 138480