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

(-)a/C4/Search.pm (-3 lines)
Lines 2068-2074 sub searchResults { Link Here
2068
            my $holdingsep = C4::Context->preference("AlternateHoldingsSeparator") || ' ';
2068
            my $holdingsep = C4::Context->preference("AlternateHoldingsSeparator") || ' ';
2069
            my @alternateholdingsinfo = ();
2069
            my @alternateholdingsinfo = ();
2070
            my @holdingsfields = $marcrecord->field(substr $fieldspec, 0, 3);
2070
            my @holdingsfields = $marcrecord->field(substr $fieldspec, 0, 3);
2071
            my $alternateholdingscount = 0;
2072
2071
2073
            for my $field (@holdingsfields) {
2072
            for my $field (@holdingsfields) {
2074
                my %holding = ( holding => '' );
2073
                my %holding = ( holding => '' );
Lines 2082-2093 sub searchResults { Link Here
2082
                }
2081
                }
2083
                if ($havesubfield) {
2082
                if ($havesubfield) {
2084
                    push(@alternateholdingsinfo, \%holding);
2083
                    push(@alternateholdingsinfo, \%holding);
2085
                    $alternateholdingscount++;
2086
                }
2084
                }
2087
            }
2085
            }
2088
2086
2089
            $oldbiblio->{'ALTERNATEHOLDINGS'} = \@alternateholdingsinfo;
2087
            $oldbiblio->{'ALTERNATEHOLDINGS'} = \@alternateholdingsinfo;
2090
            $oldbiblio->{'alternateholdings_count'} = $alternateholdingscount;
2091
        }
2088
        }
2092
2089
2093
        push( @newresults, $oldbiblio );
2090
        push( @newresults, $oldbiblio );
(-)a/t/db_dependent/Search.t (-2 / +1 lines)
Lines 684-690 ok(MARC::Record::new_from_xml($results_hashref->{biblioserver}->{RECORDS}->[0],' Link Here
684
    ($error, $results_hashref, $facets_loop) = getRecords("Godzina pąsowej róży","Godzina pąsowej róży",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
684
    ($error, $results_hashref, $facets_loop) = getRecords("Godzina pąsowej róży","Godzina pąsowej róży",[ ], [ 'biblioserver' ],20,0,\%branches,\%itemtypes,$query_type,0);
685
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
685
    @newresults = searchResults({'interface'=>'intranet'}, $query_desc, $results_hashref->{'biblioserver'}->{'hits'}, 17, 0, 0,
686
        $results_hashref->{'biblioserver'}->{"RECORDS"});
686
        $results_hashref->{'biblioserver'}->{"RECORDS"});
687
    is($newresults[0]->{'alternateholdings_count'}, 1, 'Alternate holdings filled in correctly');
687
    is(scalar(@{$newresults[0]->{'ALTERNATEHOLDINGS'}}), 1, 'Alternate holdings filled in correctly');
688
688
689
689
690
    ## Regression test for Bug 10741
690
    ## Regression test for Bug 10741
691
- 

Return to bug 33032