View | Details | Raw Unified | Return to bug 33348
Collapse All | Expand All

(-)a/C4/AuthoritiesMarc.pm (-10 / +10 lines)
Lines 323-339 sub SearchAuthorities { Link Here
323
            if ( C4::Context->preference('ShowHeadingUse') ) {
323
            if ( C4::Context->preference('ShowHeadingUse') ) {
324
                # checking valid heading use
324
                # checking valid heading use
325
                my $f008 = $authrecord->field('008');
325
                my $f008 = $authrecord->field('008');
326
                my $pos14to16 = substr( $f008->data, 14, 3 );
326
                if ($f008) {
327
                my $main = substr( $pos14to16, 0, 1 );
327
                    my $pos14to16 = substr( $f008->data, 14, 3 );
328
                $newline{main} = 1 if $main eq 'a';
328
                    my $main      = substr( $pos14to16,  0,  1 );
329
                my $subject = substr( $pos14to16, 1, 1);
329
                    $newline{main} = 1 if $main eq 'a';
330
                $newline{subject} = 1 if $subject eq 'a';
330
                    my $subject = substr( $pos14to16, 1, 1 );
331
                my $series = substr( $pos14to16, 2, 1 );
331
                    $newline{subject} = 1 if $subject eq 'a';
332
                $newline{series} = 1 if $series eq 'a';
332
                    my $series = substr( $pos14to16, 2, 1 );
333
                    $newline{series} = 1 if $series eq 'a';
334
                }
333
            }
335
            }
334
336
            $newline{authtype}     = defined($thisauthtype) ? $thisauthtype->authtypetext : '';
335
            $newline{authtype}     = defined($thisauthtype) ?
336
                                        $thisauthtype->authtypetext : '';
337
            $newline{summary}      = $summary;
337
            $newline{summary}      = $summary;
338
            $newline{even}         = $counter % 2;
338
            $newline{even}         = $counter % 2;
339
            $newline{reported_tag} = $reported_tag;
339
            $newline{reported_tag} = $reported_tag;
(-)a/Koha/SearchEngine/Elasticsearch/Search.pm (-8 / +9 lines)
Lines 257-269 sub search_auth_compat { Link Here
257
            if ( C4::Context->preference('ShowHeadingUse') ) {
257
            if ( C4::Context->preference('ShowHeadingUse') ) {
258
                # checking valid heading use
258
                # checking valid heading use
259
                my $f008 = $marc->field('008');
259
                my $f008 = $marc->field('008');
260
                my $pos14to16 = substr( $f008->data, 14, 3 );
260
                if ($f008) {
261
                my $main = substr( $pos14to16, 0, 1 );
261
                    my $pos14to16 = substr( $f008->data, 14, 3 );
262
                $result{main} = 1 if $main eq 'a';
262
                    my $main      = substr( $pos14to16,  0,  1 );
263
                my $subject = substr( $pos14to16, 1, 1);
263
                    $result{main} = 1 if $main eq 'a';
264
                $result{subject} = 1 if $subject eq 'a';
264
                    my $subject = substr( $pos14to16, 1, 1 );
265
                my $series = substr( $pos14to16, 2, 1 );
265
                    $result{subject} = 1 if $subject eq 'a';
266
                $result{series} = 1 if $series eq 'a';
266
                    my $series = substr( $pos14to16, 2, 1 );
267
                    $result{series} = 1 if $series eq 'a';
268
                }
267
            }
269
            }
268
270
269
            # Reimplementing BuildSummary is out of scope because it'll be hard
271
            # Reimplementing BuildSummary is out of scope because it'll be hard
270
- 

Return to bug 33348