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

(-)a/authorities/auth_finder.pl (-10 / +16 lines)
Lines 72-87 if ( $op eq "do_search" ) { Link Here
72
        $resultsperpage, $authtypecode, $orderby);
72
        $resultsperpage, $authtypecode, $orderby);
73
73
74
    # If an authority heading is repeated, add an arrayref to those repetions
74
    # If an authority heading is repeated, add an arrayref to those repetions
75
    # First heading -- Second heading
76
    for my $heading ( @$results ) {
75
    for my $heading ( @$results ) {
77
        my @repets = split / -- /, $heading->{summary};
76
        my $record = GetAuthority($heading->{'authid'});
78
        if ( @repets > 1 ) {
77
        my $auth_name = '';     # will be displayed in the link tooltip
79
            my @repets_loop;
78
        my $cpt = 0;
80
            for (my $i = 0; $i < @repets; $i++) {
79
        my @repets_loop;
81
                push @repets_loop,
80
        foreach my $field ($record->field('200')) {
82
                    { index => $index, repet => $i+1, value => $repets[$i] };
81
            $auth_name = $field->subfield('a');
83
            }
82
            if ($field->subfield('b')) { $auth_name .= ', ' . $field->subfield('b') }
84
            $heading->{repets} = \@repets_loop;
83
            $cpt++;
84
            push @repets_loop,
85
                    { index => $index, repet => $cpt, value => $auth_name };
86
        }
87
        if ( $cpt < 2 ) {
88
            undef @repets_loop;
89
        }
90
        else {
91
            $heading->{repets} = \@repets_loop
85
        }
92
        }
86
    }
93
    }
87
    # multi page display gestion
94
    # multi page display gestion
88
- 

Return to bug 7442