From 441040264a74b99b557dbbef6a1714465d708b45 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Tue, 13 Nov 2018 16:02:40 +0000 Subject: [PATCH] Bug 21826: (QA follow-up) Add UNIMARC support Signed-off-by: Martin Renvoize Signed-off-by: Marcel de Rooy Signed-off-by: Nick Clemens --- C4/Heading/UNIMARC.pm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/C4/Heading/UNIMARC.pm b/C4/Heading/UNIMARC.pm index fa4eb58fc0..81dafaef83 100644 --- a/C4/Heading/UNIMARC.pm +++ b/C4/Heading/UNIMARC.pm @@ -96,6 +96,21 @@ sub valid_bib_heading_tag { return $bib_heading_fields->{$tag}; } +=head2 valid_bib_heading_subfield + +=cut + +sub valid_bib_heading_subfield { + my $self = shift; + my $tag = shift; + my $subfield = shift; + + if ( exists $bib_heading_fields->{$tag} ) { + return 1 if ($bib_heading_fields->{$tag}->{subfields} =~ /$subfield/); + } + return 0; +} + =head2 parse_heading =cut -- 2.39.5