X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=cataloguing%2Fvalue_builder%2Fmarc21_linking_section.pl;h=f317f8b2fbcf752f548b7609003c2a752e321dcc;hb=10e4f3b9a5baac83342b6a81a2081d89454bebc8;hp=275d3a58999872c9ed74c96b4096a023855c42f6;hpb=1059c03b6869aea7200541173caf3b0a9b881bb5;p=koha.git diff --git a/cataloguing/value_builder/marc21_linking_section.pl b/cataloguing/value_builder/marc21_linking_section.pl index 275d3a5899..f317f8b2fb 100644 --- a/cataloguing/value_builder/marc21_linking_section.pl +++ b/cataloguing/value_builder/marc21_linking_section.pl @@ -226,7 +226,7 @@ sub plugin { my $record = MARC::Record::new_from_usmarc( $results->[$i] ); my $rechash = TransformMarcToKoha( $dbh, $record ); my $pos; - my $countitems = 1 if ( $rechash->{itemnumber} ); + my $countitems = $rechash->{itembumber} ? 1 : 0; while ( index( $rechash->{itemnumber}, '|', $pos ) > 0 ) { $countitems += 1; $pos = index( $rechash->{itemnumber}, '|', $pos ) + 1; @@ -406,4 +406,4 @@ sub plugin { output_html_with_http_headers $query, $cookie, $template->output; } -1; \ No newline at end of file +1;