Lines 1635-1646
sub searchResults {
Link Here
|
1635 |
} |
1635 |
} |
1636 |
|
1636 |
|
1637 |
# handle which records to actually retrieve |
1637 |
# handle which records to actually retrieve |
1638 |
my $times; |
1638 |
my $times; # Times is which record to process up to |
1639 |
if ( $hits && $offset + $results_per_page <= $hits ) { |
1639 |
if ( $hits && $offset + $results_per_page <= $hits ) { |
1640 |
$times = $offset + $results_per_page; |
1640 |
$times = $offset + $results_per_page; |
1641 |
} |
1641 |
} |
1642 |
else { |
1642 |
else { |
1643 |
$times = $hits; # FIXME: if $hits is undefined, why do we want to equal it? |
1643 |
$times = $hits; # If less hits than results_per_page+offset we go to the end |
1644 |
} |
1644 |
} |
1645 |
|
1645 |
|
1646 |
my $marcflavour = C4::Context->preference("marcflavour"); |
1646 |
my $marcflavour = C4::Context->preference("marcflavour"); |
Lines 1694-1706
sub searchResults {
Link Here
|
1694 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1694 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1695 |
|
1695 |
|
1696 |
SetUTF8Flag($marcrecord); |
1696 |
SetUTF8Flag($marcrecord); |
1697 |
my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw ); |
1697 |
my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw, 'no_items' ); |
1698 |
$oldbiblio->{result_number} = $i + 1; |
1698 |
$oldbiblio->{result_number} = $i + 1; |
1699 |
|
1699 |
|
1700 |
$oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour); |
1700 |
$oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour); |
1701 |
$oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour); |
1701 |
$oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour); |
1702 |
$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); |
1702 |
$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); |
1703 |
$oldbiblio->{normalized_isbn} = GetNormalizedISBN(undef,$marcrecord,$marcflavour); |
1703 |
$oldbiblio->{normalized_isbn} = GetNormalizedISBN($oldbiblio->{isbn},$marcrecord,$marcflavour); # Use existing ISBN from record if we got one |
1704 |
$oldbiblio->{content_identifier_exists} = 1 if ($oldbiblio->{normalized_isbn} or $oldbiblio->{normalized_oclc} or $oldbiblio->{normalized_ean} or $oldbiblio->{normalized_upc}); |
1704 |
$oldbiblio->{content_identifier_exists} = 1 if ($oldbiblio->{normalized_isbn} or $oldbiblio->{normalized_oclc} or $oldbiblio->{normalized_ean} or $oldbiblio->{normalized_upc}); |
1705 |
|
1705 |
|
1706 |
# edition information, if any |
1706 |
# edition information, if any |