Lines 456-463
package C4::OAI::ListRecords;
Link Here
|
456 |
|
456 |
|
457 |
use strict; |
457 |
use strict; |
458 |
use warnings; |
458 |
use warnings; |
|
|
459 |
use C4::Biblio; |
459 |
use HTTP::OAI; |
460 |
use HTTP::OAI; |
460 |
use C4::OAI::Sets; |
461 |
use C4::OAI::Sets; |
|
|
462 |
use MARC::File::XML; |
461 |
|
463 |
|
462 |
use base ("HTTP::OAI::ListRecords"); |
464 |
use base ("HTTP::OAI::ListRecords"); |
463 |
|
465 |
|
Lines 474-480
sub new {
Link Here
|
474 |
$set = GetOAISetBySpec($token->{'set'}); |
476 |
$set = GetOAISetBySpec($token->{'set'}); |
475 |
} |
477 |
} |
476 |
my $sql = " |
478 |
my $sql = " |
477 |
SELECT biblioitems.biblionumber, biblioitems.marcxml, biblioitems.timestamp |
479 |
SELECT biblioitems.biblionumber, biblioitems.timestamp |
478 |
FROM biblioitems |
480 |
FROM biblioitems |
479 |
"; |
481 |
"; |
480 |
$sql .= " JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber " if defined $set; |
482 |
$sql .= " JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber " if defined $set; |
Lines 491-497
sub new {
Link Here
|
491 |
$sth->execute( @bind_params ); |
493 |
$sth->execute( @bind_params ); |
492 |
|
494 |
|
493 |
my $pos = $token->{offset}; |
495 |
my $pos = $token->{offset}; |
494 |
while ( my ($biblionumber, $marcxml, $timestamp) = $sth->fetchrow ) { |
496 |
while ( my ($biblionumber, $timestamp) = $sth->fetchrow ) { |
|
|
497 |
my $record = GetMarcBiblio($biblionumber, 1, 1); |
498 |
my $marcxml = $record->as_xml(); |
495 |
my $oai_sets = GetOAISetsBiblio($biblionumber); |
499 |
my $oai_sets = GetOAISetsBiblio($biblionumber); |
496 |
my @setSpecs; |
500 |
my @setSpecs; |
497 |
foreach (@$oai_sets) { |
501 |
foreach (@$oai_sets) { |
498 |
- |
|
|