Bugzilla – Attachment 134260 Details for
Bug 30641
Authority detail page shows wrong number of records using the authority
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30641: Quote authority id search
Bug-30641-Quote-authority-id-search.patch (text/plain), 994 bytes, created by
Nick Clemens (kidclamp)
on 2022-04-28 13:25:39 UTC
(
hide
)
Description:
Bug 30641: Quote authority id search
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-04-28 13:25:39 UTC
Size:
994 bytes
patch
obsolete
>From c4b0a839c7f0942b121985e66d4f86db8f16248c Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Thu, 28 Apr 2022 13:25:15 +0000 >Subject: [PATCH] Bug 30641: Quote authority id search > >--- > Koha/Authorities.pm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > >diff --git a/Koha/Authorities.pm b/Koha/Authorities.pm >index a509b75fa2..b2947644a6 100644 >--- a/Koha/Authorities.pm >+++ b/Koha/Authorities.pm >@@ -51,7 +51,8 @@ sub get_usage_count { > my $authid = $params->{authid} || return; > > my $searcher = Koha::SearchEngine::Search->new({ index => $Koha::SearchEngine::BIBLIOS_INDEX }); >- my ( $err, $result, $count ) = $searcher->simple_search_compat( 'an:' . $authid, 0, 0 ); >+ my ( $err, $result, $count ) = $searcher->simple_search_compat( 'an:"' . $authid.'"', 0, 0 ); >+ # We quote the search to prevent truncation finding partial matches > if( $err ) { > warn "Error: $err from search for " . $authid; > return; >-- >2.30.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 30641
: 134260