Lines 1648-1659
sub searchResults {
Link Here
|
1648 |
} |
1648 |
} |
1649 |
|
1649 |
|
1650 |
# handle which records to actually retrieve |
1650 |
# handle which records to actually retrieve |
1651 |
my $times; |
1651 |
my $times; # Times is which record to process up to |
1652 |
if ( $hits && $offset + $results_per_page <= $hits ) { |
1652 |
if ( $hits && $offset + $results_per_page <= $hits ) { |
1653 |
$times = $offset + $results_per_page; |
1653 |
$times = $offset + $results_per_page; |
1654 |
} |
1654 |
} |
1655 |
else { |
1655 |
else { |
1656 |
$times = $hits; # FIXME: if $hits is undefined, why do we want to equal it? |
1656 |
$times = $hits; # If less hits than results_per_page+offset we go to the end |
1657 |
} |
1657 |
} |
1658 |
|
1658 |
|
1659 |
my $marcflavour = C4::Context->preference("marcflavour"); |
1659 |
my $marcflavour = C4::Context->preference("marcflavour"); |
Lines 1707-1719
sub searchResults {
Link Here
|
1707 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1707 |
: GetFrameworkCode($marcrecord->subfield($bibliotag,$bibliosubf)); |
1708 |
|
1708 |
|
1709 |
SetUTF8Flag($marcrecord); |
1709 |
SetUTF8Flag($marcrecord); |
1710 |
my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw ); |
1710 |
my $oldbiblio = TransformMarcToKoha( $marcrecord, $fw, 'no_items' ); |
1711 |
$oldbiblio->{result_number} = $i + 1; |
1711 |
$oldbiblio->{result_number} = $i + 1; |
1712 |
|
1712 |
|
1713 |
$oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour); |
1713 |
$oldbiblio->{normalized_upc} = GetNormalizedUPC( $marcrecord,$marcflavour); |
1714 |
$oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour); |
1714 |
$oldbiblio->{normalized_ean} = GetNormalizedEAN( $marcrecord,$marcflavour); |
1715 |
$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); |
1715 |
$oldbiblio->{normalized_oclc} = GetNormalizedOCLCNumber($marcrecord,$marcflavour); |
1716 |
$oldbiblio->{normalized_isbn} = GetNormalizedISBN(undef,$marcrecord,$marcflavour); |
1716 |
$oldbiblio->{normalized_isbn} = GetNormalizedISBN($oldbiblio->{isbn},$marcrecord,$marcflavour); # Use existing ISBN from record if we got one |
1717 |
$oldbiblio->{content_identifier_exists} = 1 if ($oldbiblio->{normalized_isbn} or $oldbiblio->{normalized_oclc} or $oldbiblio->{normalized_ean} or $oldbiblio->{normalized_upc}); |
1717 |
$oldbiblio->{content_identifier_exists} = 1 if ($oldbiblio->{normalized_isbn} or $oldbiblio->{normalized_oclc} or $oldbiblio->{normalized_ean} or $oldbiblio->{normalized_upc}); |
1718 |
|
1718 |
|
1719 |
# edition information, if any |
1719 |
# edition information, if any |