[Koha-patches] (BUG #4903) oai.pl: OAI doesn't work out of the box - XSL path
Tomas Cohen Arazi
tomascohen at gmail.com
Fri Jun 25 03:32:18 CEST 2010
On Thu, Jun 24, 2010 at 9:49 PM, Galen Charlton <gmcharlt at gmail.com> wrote:
>
> This won't work across all installation modes. dev-mode installation,
> for example, does not define a directory called htdocs. Instead, try
> using C4::Context->config('intrahtdocs') . '/prog/en/xslt' and see if
> that resolves the problem. If so, please submit a revised patch.
This one works fine in 'standard' install, using the context variable
you proposed. Is there a reference for such variables?
To+
diff --git a/opac/oai.pl b/opac/oai.pl
index 546623e..51022de 100755
--- a/opac/oai.pl
+++ b/opac/oai.pl
@@ -462,8 +462,8 @@ sub oai_dc_stylesheet {
my $self = shift;
unless ( $self->{ oai_dc_stylesheet } ) {
- my $xslt_file = C4::Context->config('intranetdir') .
- "/koha-tmpl/intranet-tmpl/prog/en/xslt/" .
+ my $xslt_file = C4::Context->config('intrahtdocs') .
+ '/prog/en/xslt/' .
C4::Context->preference('marcflavour') .
"slim2OAIDC.xsl";
my $parser = XML::LibXML->new();
More information about the Koha-patches
mailing list