Bugzilla – Attachment 60836 Details for
Bug 15108
OAI-PMH provider improvements
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 15108 - OAI-PMH provider improvements
Bug-15108---OAI-PMH-provider-improvements.patch (text/plain), 2.47 KB, created by
Olli-Antti Kivilahti
on 2017-03-06 11:36:32 UTC
(
hide
)
Description:
Bug 15108 - OAI-PMH provider improvements
Filename:
MIME Type:
Creator:
Olli-Antti Kivilahti
Created:
2017-03-06 11:36:32 UTC
Size:
2.47 KB
patch
obsolete
>From bcfa8da2b9b7f737c3b8927600434b666a7bbd9f Mon Sep 17 00:00:00 2001 >From: Ere Maijala <ere.maijala@helsinki.fi> >Date: Thu, 23 Feb 2017 14:44:09 +0200 >Subject: [PATCH] Bug 15108 - OAI-PMH provider improvements > >Fixed OAI-PMH Server tests to delete any existing issues before deleting biblios, to delete oai_sets to avoid sets in the responses and to work with UNIMARC and NORMARC as well as MARC 21. > >Signed-off-by: Olli-Antti Kivilahti <olli-antti.kivilahti@jns.fi> >--- > t/db_dependent/OAI/Server.t | 12 ++++++++++-- > 1 file changed, 10 insertions(+), 2 deletions(-) > >diff --git a/t/db_dependent/OAI/Server.t b/t/db_dependent/OAI/Server.t >index 4e1215c..1aa7fc1 100644 >--- a/t/db_dependent/OAI/Server.t >+++ b/t/db_dependent/OAI/Server.t >@@ -59,10 +59,12 @@ $schema->storage->txn_begin; > my $dbh = C4::Context->dbh; > > $dbh->do("SET time_zone='+00:00'"); >+$dbh->do('DELETE FROM issues'); > $dbh->do('DELETE FROM biblio'); > $dbh->do('DELETE FROM deletedbiblio'); > $dbh->do('DELETE FROM deletedbiblioitems'); > $dbh->do('DELETE FROM deleteditems'); >+$dbh->do('DELETE FROM oai_sets'); > > my $date_added = DateTime->now() . 'Z'; > my $date_to = substr($date_added, 0, 10) . 'T23:59:59Z'; >@@ -72,7 +74,13 @@ my $sth = $dbh->prepare('SELECT timestamp FROM biblioitems WHERE biblionumber=?' > # Add biblio records > foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { > my $record = MARC::Record->new(); >- $record->append_fields( MARC::Field->new('245', '', '', 'a' => "Title $index" ) ); >+ if (C4::Context->preference('marcflavour') eq 'UNIMARC') { >+ $record->append_fields( MARC::Field->new('101', '', '', 'a' => "lng" ) ); >+ $record->append_fields( MARC::Field->new('200', '', '', 'a' => "Title $index" ) ); >+ } else { >+ $record->append_fields( MARC::Field->new('008', ' lng' ) ); >+ $record->append_fields( MARC::Field->new('245', '', '', 'a' => "Title $index" ) ); >+ } > my ($biblionumber) = AddBiblio($record, ''); > $sth->execute($biblionumber); > my $timestamp = $sth->fetchrow_array . 'Z'; >@@ -86,7 +94,7 @@ foreach my $index ( 0 .. NUMBER_OF_MARC_RECORDS - 1 ) { > metadata => { > 'oai_dc:dc' => { > 'dc:title' => "Title $index", >- 'dc:language' => {}, >+ 'dc:language' => "lng", > 'dc:type' => {}, > 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', > 'xmlns:oai_dc' => 'http://www.openarchives.org/OAI/2.0/oai_dc/', >-- >2.7.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 15108
:
44317
|
44318
|
51962
|
52416
|
52422
|
52423
|
53853
|
53854
|
56813
|
56844
|
58058
|
58059
|
58060
|
58061
|
58062
|
58063
|
58064
|
58065
|
58072
|
58080
|
58245
|
58246
|
58247
|
58248
|
58249
|
58250
|
58251
|
60260
|
60331
|
60608
|
60835
|
60836
|
63172
|
63173
|
63174