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 251-263 sub search_auth_compat { Link Here
251
            if ( C4::Context->preference('ShowHeadingUse') ) {
251
            if ( C4::Context->preference('ShowHeadingUse') ) {
252
                # checking valid heading use
252
                # checking valid heading use
253
                my $f008 = $marc->field('008');
253
                my $f008 = $marc->field('008');
254
                my $pos14to16 = substr( $f008->data, 14, 3 );
254
                if ($f008) {
255
                my $main = substr( $pos14to16, 0, 1 );
255
                    my $pos14to16 = substr( $f008->data, 14, 3 );
256
                $result{main} = 1 if $main eq 'a';
256
                    my $main      = substr( $pos14to16,  0,  1 );
257
                my $subject = substr( $pos14to16, 1, 1);
257
                    $result{main} = 1 if $main eq 'a';
258
                $result{subject} = 1 if $subject eq 'a';
258
                    my $subject = substr( $pos14to16, 1, 1 );
259
                my $series = substr( $pos14to16, 2, 1 );
259
                    $result{subject} = 1 if $subject eq 'a';
260
                $result{series} = 1 if $series eq 'a';
260
                    my $series = substr( $pos14to16, 2, 1 );
261
                    $result{series} = 1 if $series eq 'a';
262
                }
261
            }
263
            }
262
264
263
            # Reimplementing BuildSummary is out of scope because it'll be hard
265
            # Reimplementing BuildSummary is out of scope because it'll be hard
264
- 

Return to bug 33348