From 5eeb37b7f19f29082e7b1d66db619cdeeb94c03d Mon Sep 17 00:00:00 2001 From: Christophe Croullebois Date: Thu, 12 May 2011 10:51:15 +0200 Subject:bug 6334 [PATCH 1/1] (MT #6453) Using OAI with the OPACBaseURL syspref In the UNIMARslim2OAID.xsl the link to biblio was hardcoded, with this patch it takes the value of OPACBaseURL. --- .../prog/en/xslt/UNIMARCslim2OAIDC.xsl | 2 +- opac/oai.pl | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl index 27c78ed..015a16a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl +++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/UNIMARCslim2OAIDC.xsl @@ -168,7 +168,7 @@ - http://opac.mylibrary.org/bib/ + /bib/ diff --git a/opac/oai.pl b/opac/oai.pl index 51ce9af..d0878a0 100755 --- a/opac/oai.pl +++ b/opac/oai.pl @@ -202,8 +202,9 @@ sub new { my $parser = XML::LibXML->new(); my $record_dom = $parser->parse_string($marcxml); my $format = $args{metadataPrefix}; + my $syspref = C4::Context->preference("OPACBaseURL"); if ( $format ne 'marcxml' ) { - $record_dom = $repository->stylesheet($format)->transform($record_dom); + $record_dom = $repository->stylesheet($format)->transform($record_dom, syspref=> $syspref); } $self->metadata( HTTP::OAI::Metadata->new( dom => $record_dom ) ); -- 1.7.0.4