[Koha-patches] [PATCH] OAI server fixes
Frédéric Demians
f.demians at tamil.fr
Wed Feb 17 15:05:47 CET 2010
- 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.
---
.../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 7c5685b..39e4bb2 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 <code>ListRecords</code> or <code>ListIdentifiers</code> 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 02ffdf6..b434980 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},
--
1.6.4.3
More information about the Koha-patches
mailing list