From 821cfebad6fac4cd7e280f9091d9200b48c084c1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Fr=C3=A9d=C3=A9ric=20Demians?= Date: Wed, 17 Feb 2010 15:05:47 +0100 Subject: [PATCH] OAI server fixes - Add preference OAI-PMH:ConfFile. I just add it in web-services.pref and not in DB. It's enough. It's not an end-user preference. Without this pref, OAI server operates as previously. And preferences editor allow to add a new value to the DB if necessary. - Fix response to ListMetadataFormats which was empty in extended mode. Signed-off-by: Galen Charlton --- .../prog/en/modules/admin/preferences/web-services.pref | 7 ++++++- opac/oai.pl | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web-services.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web-services.pref index 7c5685bb65..39e4bb228c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web-services.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/web-services.pref @@ -16,4 +16,9 @@ Web Services: - Only return - pref: "OAI-PMH:MaxCount" class: integer - - records at a time in response to a ListRecords or ListIdentifiers query. + - records at a time in response to a ListRecords or ListIdentifiers query. + - + - YAML OAI Koha server configuration file: + - pref: "OAI-PMH:ConfFile" + class: file + - . If empty, Koha OAI Server operates in normal mode, otherwise it operates in extended mode. In extended mode, it's possible to parameter other formats than marcxml or Dublin Core. OAI-PMH:ConfFile specify a YAML configuration file which list available metadata formats and XSL file used to create them from marcxml records. diff --git a/opac/oai.pl b/opac/oai.pl index 02ffdf6b57..b43498036f 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -156,7 +156,7 @@ sub new { my $self = $class->SUPER::new(); if ( $repository->{ conf } ) { - foreach my $name ( @{ $self->{ koha_metadata_formats } } ) { + foreach my $name ( @{ $repository->{ koha_metadata_format } } ) { my $format = $repository->{ conf }->{ format }->{ $name }; $self->metadataFormat( HTTP::OAI::MetadataFormat->new( metadataPrefix => $format->{metadataPrefix}, -- 2.20.1