Bugzilla – Attachment 141766 Details for
Bug 17704
Fix OAI breakage when using HTTP::OAI 4.03+
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17704: Adapt Koha::OAI::* to the new HTTP::OAI api
Bug-17704-Adapt-KohaOAI-to-the-new-HTTPOAI-api.patch (text/plain), 1.81 KB, created by
Mason James
on 2022-10-13 01:57:24 UTC
(
hide
)
Description:
Bug 17704: Adapt Koha::OAI::* to the new HTTP::OAI api
Filename:
MIME Type:
Creator:
Mason James
Created:
2022-10-13 01:57:24 UTC
Size:
1.81 KB
patch
obsolete
>From d5170a39d9ab3eb9a302458661555e18f013ea98 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Fri, 9 Feb 2018 12:02:54 -0300 >Subject: [PATCH] Bug 17704: Adapt Koha::OAI::* to the new HTTP::OAI api >Content-Type: text/plain; charset="utf-8" > >This is my attempt to adapt the existing implementation to the new >version of the HTTP::OAI lib. Currently 4.06 is released, but 4.07 >should be used once released, as it contains the fix for the ->xslt >method missing. > >Signed-off-by: David Cook <dcook@prosentient.com.au> >Signed-off-by: Mason James <mtj@kohaaloha.com> >--- > Koha/OAI/Server/Repository.pm | 22 ++++++++++++++++++---- > 1 file changed, 18 insertions(+), 4 deletions(-) > >diff --git a/Koha/OAI/Server/Repository.pm b/Koha/OAI/Server/Repository.pm >index 0cd0df5dcf..aa7de2673e 100644 >--- a/Koha/OAI/Server/Repository.pm >+++ b/Koha/OAI/Server/Repository.pm >@@ -99,7 +99,6 @@ Note the 'include_items' parameter which is the only mean to return item-level i > > =cut > >- > sub new { > my ($class, %args) = @_; > my $self = $class->SUPER::new(%args); >@@ -150,9 +149,24 @@ sub new { > $response = $class->new($self, %attr); > } > >- $response->set_handler( XML::SAX::Writer->new( Output => *STDOUT ) ); >- $response->xslt( "/opac-tmpl/xslt/OAI.xslt" ); >- $response->generate; >+ my $w = XML::SAX::Writer->new( Output => *STDOUT ); >+ >+ my $driver = HTTP::OAI::SAX::Driver->new( >+ Handler => my $builder = XML::LibXML::SAX::Builder->new() >+ ); >+ >+ $self->{ driver } = $driver; >+ $self->{ builder } = $builder; >+ >+ $driver->start_oai_pmh(); >+ >+ $response->set_handler($w); >+ #$response->xslt( "/opac-tmpl/xslt/OAI.xslt" ); >+ $response->generate($driver); >+ >+ $driver->end_oai_pmh(); >+ >+ print $builder->result; > > bless $self, $class; > return $self; >-- >2.20.1
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 17704
:
75331
|
107214
|
107215
|
107216
|
141762
|
141763
|
141764
|
141765
|
141766
|
146457
|
146458
|
146459