Bugzilla – Attachment 187656 Details for
Bug 40017
Z39.50 search: Allow leader and specific control field positions in Additional fields
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40017: (follow-up) More rigorous checking
Bug-40017-follow-up-More-rigorous-checking.patch (text/plain), 1.76 KB, created by
Martin Renvoize (ashimema)
on 2025-10-09 12:27:00 UTC
(
hide
)
Description:
Bug 40017: (follow-up) More rigorous checking
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-09 12:27:00 UTC
Size:
1.76 KB
patch
obsolete
>From 486a98b1a834791d098136c23c9fb03b6ece0939 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 2 Jun 2025 11:00:31 +0200 >Subject: [PATCH] Bug 40017: (follow-up) More rigorous checking > >Adding a few checks to resolve the errors David found while >testing. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: David Nind <david@davidnind.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > C4/Breeding.pm | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > >diff --git a/C4/Breeding.pm b/C4/Breeding.pm >index ad86bc23c33..b1af8c591b7 100644 >--- a/C4/Breeding.pm >+++ b/C4/Breeding.pm >@@ -379,10 +379,10 @@ sub _add_custom_field_rowdata { > warn "Breeding: invalid expression in AdditionalFieldsInZ3950Result(Auth)Search: $field"; > next; > } elsif ( $tag eq '000' ) { >- push @content, ( _extract_positions( $record->leader, $add_spec ) ); >+ push @content, ( _extract_positions( $record->leader, $add_spec ) ) if $record->leader; > } elsif ( $tag =~ /^00\d$/ ) { # control field > my $marcfield = $record->field($tag); >- push @content, ( _extract_positions( $marcfield->data, $add_spec ) ); >+ push @content, ( _extract_positions( $marcfield->data, $add_spec ) ) if $marcfield; > } else { > for my $marcfield ( $record->field($tag) ) { > foreach my $subfield ( $marcfield->subfields ) { >@@ -402,7 +402,9 @@ sub _add_custom_field_rowdata { > > sub _extract_positions { > my ( $data, $spec ) = @_; >- if ( !$spec ) { >+ if ( !defined($data) ) { >+ return; >+ } elsif ( !$spec ) { > return $data; > } elsif ( $spec =~ /p(\d+)$/ ) { > my $pos = $1; >-- >2.51.0
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 40017
:
182821
|
182902
|
182939
|
182940
|
187655
| 187656