Bugzilla – Attachment 150891 Details for
Bug 33277
Correctly handle linking subfields with no defined thesaurus
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33277: (follow-up) Don't use regex, tidy
Bug-33277-follow-up-Dont-use-regex-tidy.patch (text/plain), 1.93 KB, created by
Nick Clemens (kidclamp)
on 2023-05-09 15:42:25 UTC
(
hide
)
Description:
Bug 33277: (follow-up) Don't use regex, tidy
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-05-09 15:42:25 UTC
Size:
1.93 KB
patch
obsolete
>From e6739eada1d1f77f22c89fb63ad66505dde452d0 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Tue, 9 May 2023 13:51:59 +0000 >Subject: [PATCH] Bug 33277: (follow-up) Don't use regex, tidy > >--- > C4/Heading.pm | 25 +++++++++++++++++-------- > 1 file changed, 17 insertions(+), 8 deletions(-) > >diff --git a/C4/Heading.pm b/C4/Heading.pm >index b408622038..ca77c02262 100644 >--- a/C4/Heading.pm >+++ b/C4/Heading.pm >@@ -22,7 +22,7 @@ use Modern::Perl; > use MARC::Field; > use C4::Context; > use Module::Load qw( load ); >- >+use List::Util qw( none ); > > =head1 NAME > >@@ -239,15 +239,24 @@ sub _search { > my ( $matched_auths, $total ) = $searcher->search_auth_compat( $search_query, 0, 20, $skipmetadata ); > # Some auth records may not contain the 040$f to specify their source > # This is legal, so we do a fallback search >- if( !$total && $thesaurus && !( grep /$thesaurus/,('lcsh','lcac','mesh','nal','notspecified','cash','rvm','sears','aat') ) ){ >+ if ( >+ !$total >+ && $thesaurus >+ && none { $_ eq $thesaurus } ( >+ 'lcsh', 'lcac', 'mesh', 'nal', >+ 'notspecified', 'cash', 'rvm', 'sears', >+ 'aat' >+ ) >+ ) >+ { > pop @value; > push @value, 'notdefined'; >- $search_query = $builder->build_authorities_query_compat( >- \@marclist, \@and_or, \@excluding, \@operator, >- \@value, $self->{'auth_type'}, >- 'AuthidAsc' >- ); >- ( $matched_auths, $total ) = $searcher->search_auth_compat( $search_query, 0, 20, $skipmetadata ); >+ $search_query = >+ $builder->build_authorities_query_compat( \@marclist, \@and_or, >+ \@excluding, \@operator, \@value, $self->{'auth_type'}, >+ 'AuthidAsc' ); >+ ( $matched_auths, $total ) = >+ $searcher->search_auth_compat( $search_query, 0, 20, $skipmetadata ); > } > return ( $matched_auths, $total ); > >-- >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 33277
:
148417
|
148418
|
148419
|
148492
|
148493
|
148494
|
148495
|
148500
|
148527
|
148528
|
148529
|
148530
|
148531
|
148734
|
148735
|
148957
|
149837
|
149838
|
149839
|
149840
|
149841
|
149842
|
150890
|
150891
|
150977
|
150978
|
150979
|
150980
|
150981
|
150982
|
150983