Bugzilla – Attachment 41137 Details for
Bug 12252
OAI-PMH GetRecord result doesn't include item data
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 12252 - include item data in OAI-PMH ListRecords result
Bug-12252---include-item-data-in-OAI-PMH-ListRecor.patch (text/plain), 2.09 KB, created by
Frédéric Demians
on 2015-07-23 16:48:27 UTC
(
hide
)
Description:
Bug 12252 - include item data in OAI-PMH ListRecords result
Filename:
MIME Type:
Creator:
Frédéric Demians
Created:
2015-07-23 16:48:27 UTC
Size:
2.09 KB
patch
obsolete
>From 95f56b4a4640012920dfb307ac49e029fd01cef9 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Mon, 23 Jun 2014 17:16:50 +1200 >Subject: [PATCH] Bug 12252 - include item data in OAI-PMH ListRecords result > >Same in spirit to the other patch, this also includes the item detail in >ListRecords. > >Test plan: >* Fetch a URL like: >http://koha/cgi-bin/koha/oai.pl?verb=ListRecords&metadataPrefix=marcxml >* Verify that there are 952 entries in the returned records where > appropriate. > >Signed-off-by: Frederic Demians <f.demians@tamil.fr> > >ListRecords OAI verb returns a list of records including items in 952/995 which >are not hidden based on OpacHiddenItems syspref. > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > opac/oai.pl | 8 ++++++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/opac/oai.pl b/opac/oai.pl >index c8fd69f..cf68a03 100755 >--- a/opac/oai.pl >+++ b/opac/oai.pl >@@ -523,8 +523,10 @@ package C4::OAI::ListRecords; > > use strict; > use warnings; >+use C4::Biblio; > use HTTP::OAI; > use C4::OAI::Sets; >+use MARC::File::XML; > > use base ("HTTP::OAI::ListRecords"); > >@@ -542,7 +544,7 @@ sub new { > } > my $max = $repository->{koha_max_count}; > my $sql = " >- (SELECT biblioitems.biblionumber, biblioitems.marcxml, biblioitems.timestamp >+ SELECT biblioitems.biblionumber, biblioitems.timestamp > FROM biblioitems > "; > $sql .= " JOIN oai_sets_biblios ON biblioitems.biblionumber = oai_sets_biblios.biblionumber " if defined $set; >@@ -566,7 +568,7 @@ sub new { > $sth->execute( @bind_params ); > > my $count = 0; >- while ( my ($biblionumber, $marcxml, $timestamp) = $sth->fetchrow ) { >+ while ( my ($biblionumber, $timestamp) = $sth->fetchrow ) { > $count++; > if ( $count > $max ) { > $self->resumptionToken( >@@ -580,6 +582,8 @@ sub new { > ); > last; > } >+ my $record = GetMarcBiblio($biblionumber, 1, 1); >+ my $marcxml = $record->as_xml(); > my $oai_sets = GetOAISetsBiblio($biblionumber); > my @setSpecs; > foreach (@$oai_sets) { >-- >2.4.6
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 12252
:
28228
|
28229
|
28243
|
28344
|
28345
|
29159
|
29160
|
33120
|
33121
|
33122
|
34890
|
35006
|
35007
|
35008
|
35009
|
35010
|
35011
|
41135
|
41136
|
41137
|
41138
|
41139
|
41140
|
41175
|
41176
|
41177
|
41178
|
41179
|
41180
|
42018
|
42019
|
42020
|
42021
|
42022
|
42023
|
42024
|
42314
|
42575
|
42576
|
42577
|
42578
|
42579
|
42580
|
42581