Lines 85-91
foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) {
Link Here
|
85 |
$sth->execute($biblionumber); |
85 |
$sth->execute($biblionumber); |
86 |
my $timestamp = $sth->fetchrow_array . 'Z'; |
86 |
my $timestamp = $sth->fetchrow_array . 'Z'; |
87 |
$timestamp =~ s/ /T/; |
87 |
$timestamp =~ s/ /T/; |
88 |
$timestamp = manipulate_timestamp( $index, $biblionumber, $timestamp ); |
|
|
89 |
$record = GetMarcBiblio({ biblionumber => $biblionumber }); |
88 |
$record = GetMarcBiblio({ biblionumber => $biblionumber }); |
90 |
$record = XMLin($record->as_xml_record); |
89 |
$record = XMLin($record->as_xml_record); |
91 |
push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" }; |
90 |
push @header, { datestamp => $timestamp, identifier => "TEST:$biblionumber" }; |
Lines 353-358
subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me
Link Here
|
353 |
my $record = GetMarcBiblio({biblionumber => $biblionumber}); |
352 |
my $record = GetMarcBiblio({biblionumber => $biblionumber}); |
354 |
$record->append_fields(MARC::Field->new(999, '', '', z => '_')); |
353 |
$record->append_fields(MARC::Field->new(999, '', '', z => '_')); |
355 |
ModBiblio($record, $biblionumber); |
354 |
ModBiblio($record, $biblionumber); |
|
|
355 |
$oaidc[0]->{header}->{datestamp} = $from; |
356 |
|
356 |
|
357 |
test_query( |
357 |
test_query( |
358 |
'ListRecords oai_dc with parameter from', |
358 |
'ListRecords oai_dc with parameter from', |
Lines 364-378
subtest 'Bug 19725: OAI-PMH ListRecords and ListIdentifiers should use biblio_me
Link Here
|
364 |
}; |
364 |
}; |
365 |
|
365 |
|
366 |
$schema->storage->txn_rollback; |
366 |
$schema->storage->txn_rollback; |
367 |
|
|
|
368 |
sub manipulate_timestamp { |
369 |
# This eliminates waiting a few seconds in order to get a higher timestamp |
370 |
# Works only for 60 records.. |
371 |
my ( $index, $bibno, $timestamp ) = @_; |
372 |
return $timestamp if $timestamp !~ /\d{2}Z/; |
373 |
my $secs = sprintf( "%02d", $index ); |
374 |
$timestamp =~ s/\d{2}Z/${secs}Z/; |
375 |
$dbh->do("UPDATE biblioitems SET timestamp=? WHERE biblionumber=?", undef, |
376 |
( $timestamp, $bibno )); |
377 |
return $timestamp; |
378 |
} |
379 |
- |