Bug 33348: (follow-up) Fix if no 008 defined
And copy fix across to Zebra search as well.
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 7c40544951)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
8e8979cb4e
commit
97477f9258
|
|
@ -323,17 +323,17 @@ sub SearchAuthorities {
|
|||
if ( C4::Context->preference('ShowHeadingUse') ) {
|
||||
# checking valid heading use
|
||||
my $f008 = $authrecord->field('008');
|
||||
my $pos14to16 = substr( $f008->data, 14, 3 );
|
||||
my $main = substr( $pos14to16, 0, 1 );
|
||||
$newline{main} = 1 if $main eq 'a';
|
||||
my $subject = substr( $pos14to16, 1, 1);
|
||||
$newline{subject} = 1 if $subject eq 'a';
|
||||
my $series = substr( $pos14to16, 2, 1 );
|
||||
$newline{series} = 1 if $series eq 'a';
|
||||
if ($f008) {
|
||||
my $pos14to16 = substr( $f008->data, 14, 3 );
|
||||
my $main = substr( $pos14to16, 0, 1 );
|
||||
$newline{main} = 1 if $main eq 'a';
|
||||
my $subject = substr( $pos14to16, 1, 1 );
|
||||
$newline{subject} = 1 if $subject eq 'a';
|
||||
my $series = substr( $pos14to16, 2, 1 );
|
||||
$newline{series} = 1 if $series eq 'a';
|
||||
}
|
||||
}
|
||||
|
||||
$newline{authtype} = defined($thisauthtype) ?
|
||||
$thisauthtype->authtypetext : '';
|
||||
$newline{authtype} = defined($thisauthtype) ? $thisauthtype->authtypetext : '';
|
||||
$newline{summary} = $summary;
|
||||
$newline{even} = $counter % 2;
|
||||
$newline{reported_tag} = $reported_tag;
|
||||
|
|
|
|||
|
|
@ -251,13 +251,15 @@ sub search_auth_compat {
|
|||
if ( C4::Context->preference('ShowHeadingUse') ) {
|
||||
# checking valid heading use
|
||||
my $f008 = $marc->field('008');
|
||||
my $pos14to16 = substr( $f008->data, 14, 3 );
|
||||
my $main = substr( $pos14to16, 0, 1 );
|
||||
$result{main} = 1 if $main eq 'a';
|
||||
my $subject = substr( $pos14to16, 1, 1);
|
||||
$result{subject} = 1 if $subject eq 'a';
|
||||
my $series = substr( $pos14to16, 2, 1 );
|
||||
$result{series} = 1 if $series eq 'a';
|
||||
if ($f008) {
|
||||
my $pos14to16 = substr( $f008->data, 14, 3 );
|
||||
my $main = substr( $pos14to16, 0, 1 );
|
||||
$result{main} = 1 if $main eq 'a';
|
||||
my $subject = substr( $pos14to16, 1, 1 );
|
||||
$result{subject} = 1 if $subject eq 'a';
|
||||
my $series = substr( $pos14to16, 2, 1 );
|
||||
$result{series} = 1 if $series eq 'a';
|
||||
}
|
||||
}
|
||||
|
||||
# Reimplementing BuildSummary is out of scope because it'll be hard
|
||||
|
|
|
|||
Loading…
Reference in New Issue