Bugzilla – Attachment 72529 Details for
Bug 20097
marc2dcxml croaks on format dc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20097: Use same regex in marc2dcxml and opac-export
Bug-20097-Use-same-regex-in-marc2dcxml-and-opac-ex.patch (text/plain), 1.89 KB, created by
Mark Tompsett
on 2018-03-08 03:13:07 UTC
(
hide
)
Description:
Bug 20097: Use same regex in marc2dcxml and opac-export
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2018-03-08 03:13:07 UTC
Size:
1.89 KB
patch
obsolete
>From 57458cc038752d6353de61214308c3cf2a9299e9 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Mon, 29 Jan 2018 10:32:28 +0100 >Subject: [PATCH] Bug 20097: Use same regex in marc2dcxml and opac-export > >This regex allows: dc, oaidc, srwdc, and rdfdc. > >Test plan: >[1] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=dc >[2] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=oaidc >[3] Check https://[yourserver]/cgi-bin/koha/opac-export.pl?bib=[some_biblionumber]&op=export&format=nodc. This one should trigger a not-supported message. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> > >Signed-off-by: Mark Tompsett <mtompset@hotmail.com> >--- > C4/Record.pm | 2 +- > opac/opac-export.pl | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > >diff --git a/C4/Record.pm b/C4/Record.pm >index af619ac..e741c4f 100644 >--- a/C4/Record.pm >+++ b/C4/Record.pm >@@ -294,7 +294,7 @@ sub marc2dcxml { > }; > } elsif ( $record =~ /^MARC::Record/ ) { # if OK makes xslt transformation > my $xslt_engine = Koha::XSLT_Handler->new; >- if ( $format =~ /oaidc|srwdc|rdfdc/ ) { >+ if ( $format =~ /^(dc|oaidc|srwdc|rdfdc)$/i ) { > $output = $xslt_engine->transform( $marcxml, $xsl ); > } else { > croak "The format argument ($format) not accepted.\n" . >diff --git a/opac/opac-export.pl b/opac/opac-export.pl >index 6023d78..4ffe1d3 100755 >--- a/opac/opac-export.pl >+++ b/opac/opac-export.pl >@@ -78,7 +78,7 @@ elsif ($format =~ /bibtex/) { > $marc = marc2bibtex($marc,$biblionumber); > $format = 'bibtex'; > } >-elsif ($format =~ /dc$/) { >+elsif ($format =~ /^(dc|oaidc|srwdc|rdfdc)$/i ) { > # TODO: Dublin Core leaks fields marked hidden by framework. > $marc = marc2dcxml($marc, undef, $biblionumber, $format); > $format = "dublin-core.xml"; >-- >2.1.4
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 20097
:
71018
|
72528
|
72529
|
72530
|
72537
|
72538