Lines 523-530
package C4::OAI::ListRecords;
Link Here
|
523 |
|
523 |
|
524 |
use strict; |
524 |
use strict; |
525 |
use warnings; |
525 |
use warnings; |
|
|
526 |
use C4::Biblio; |
526 |
use HTTP::OAI; |
527 |
use HTTP::OAI; |
527 |
use C4::OAI::Sets; |
528 |
use C4::OAI::Sets; |
|
|
529 |
use MARC::File::XML; |
528 |
|
530 |
|
529 |
use base ("HTTP::OAI::ListRecords"); |
531 |
use base ("HTTP::OAI::ListRecords"); |
530 |
|
532 |
|
Lines 542-548
sub new {
Link Here
|
542 |
} |
544 |
} |
543 |
my $max = $repository->{koha_max_count}; |
545 |
my $max = $repository->{koha_max_count}; |
544 |
my $sql = " |
546 |
my $sql = " |
545 |
(SELECT biblioitems.biblionumber, biblioitems.marcxml, biblioitems.timestamp |
547 |
SELECT biblioitems.biblionumber, biblioitems.timestamp |
546 |
FROM biblioitems |
548 |
FROM biblioitems |
547 |
"; |
549 |
"; |
548 |
$sql .= " JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber " if defined $set; |
550 |
$sql .= " JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber " if defined $set; |
Lines 566-572
sub new {
Link Here
|
566 |
$sth->execute( @bind_params ); |
568 |
$sth->execute( @bind_params ); |
567 |
|
569 |
|
568 |
my $count = 0; |
570 |
my $count = 0; |
569 |
while ( my ($biblionumber, $marcxml, $timestamp) = $sth->fetchrow ) { |
571 |
while ( my ($biblionumber, $timestamp) = $sth->fetchrow ) { |
570 |
$count++; |
572 |
$count++; |
571 |
if ( $count > $max ) { |
573 |
if ( $count > $max ) { |
572 |
$self->resumptionToken( |
574 |
$self->resumptionToken( |
Lines 580-585
sub new {
Link Here
|
580 |
); |
582 |
); |
581 |
last; |
583 |
last; |
582 |
} |
584 |
} |
|
|
585 |
my $record = GetMarcBiblio($biblionumber, 1, 1); |
586 |
my $marcxml = $record->as_xml(); |
583 |
my $oai_sets = GetOAISetsBiblio($biblionumber); |
587 |
my $oai_sets = GetOAISetsBiblio($biblionumber); |
584 |
my @setSpecs; |
588 |
my @setSpecs; |
585 |
foreach (@$oai_sets) { |
589 |
foreach (@$oai_sets) { |
586 |
- |
|
|