From 9eb13aa3cdd47738d42615d6d5dc03b84bf9194c Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Mon, 15 Jul 2013 15:00:57 +0000 Subject: [PATCH] Bug 10592: fix MARC21 006/008 cataloging plugins Move the XML and XSD data files so that access to them (particularly the XML files) is not blocked by the Apache configuration change introduced by the patch for bug 9812. To test, after applying the patch. [1] Open a MARC21 bibliographic record in the cataloging editor. [2] Click on the plugin link for the 008 field. Verify that that the form for all of the fixed field positions is displayed, and verify that you can change the type of material. [3] Repeat step 2 for the 006 field. [4] Verify that there are no entries in the Apache error log that contain client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_008.xml or client denied by server configuration: {...}/cataloguing/value_builder/marc21_field_006.xml Signed-off-by: Galen Charlton Signed-off-by: Chris Cormack Signed-off-by: Katrin Fischer Also verified translation of those plugins still works correctly. Signed-off-by: Galen Charlton --- cataloguing/value_builder/marc21_field_006.pl | 2 +- cataloguing/value_builder/marc21_field_008.pl | 2 +- .../cataloguing/value_builder => data}/marc21_field_006.xml | 0 .../cataloguing/value_builder => data}/marc21_field_008.xml | 0 .../cataloguing/value_builder => data}/marc21_field_CF.xsd | 0 koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js | 2 +- 6 files changed, 3 insertions(+), 3 deletions(-) rename koha-tmpl/intranet-tmpl/prog/en/{modules/cataloguing/value_builder => data}/marc21_field_006.xml (100%) rename koha-tmpl/intranet-tmpl/prog/en/{modules/cataloguing/value_builder => data}/marc21_field_008.xml (100%) rename koha-tmpl/intranet-tmpl/prog/en/{modules/cataloguing/value_builder => data}/marc21_field_CF.xsd (100%) diff --git a/cataloguing/value_builder/marc21_field_006.pl b/cataloguing/value_builder/marc21_field_006.pl index 7b55a0a746..bba0c5fb90 100755 --- a/cataloguing/value_builder/marc21_field_006.pl +++ b/cataloguing/value_builder/marc21_field_006.pl @@ -86,7 +86,7 @@ sub plugin { my $errorXml = ''; # Check if the xml, xsd exists and is validated - my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/modules/cataloguing/value_builder/'; + my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/'; if (-r $dir . 'marc21_field_006.xml') { my $doc = XML::LibXML->new->parse_file($dir . 'marc21_field_006.xml'); if (-r $dir . 'marc21_field_CF.xsd') { diff --git a/cataloguing/value_builder/marc21_field_008.pl b/cataloguing/value_builder/marc21_field_008.pl index e6e9af1418..6fbb3d1b3f 100755 --- a/cataloguing/value_builder/marc21_field_008.pl +++ b/cataloguing/value_builder/marc21_field_008.pl @@ -106,7 +106,7 @@ sub plugin { $result = "$dateentered" . "b xxu||||| |||| 00| 0 $lang d" unless $result; my $errorXml = ''; # Check if the xml, xsd exists and is validated - my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/modules/cataloguing/value_builder/'; + my $dir = C4::Context->config('intrahtdocs') . '/prog/' . $template->{lang} . '/data/'; if (-r $dir . 'marc21_field_008.xml') { my $doc = XML::LibXML->new->parse_file($dir . 'marc21_field_008.xml'); if (-r $dir . 'marc21_field_CF.xsd') { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml similarity index 100% rename from koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml rename to koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml similarity index 100% rename from koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml rename to koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd b/koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd similarity index 100% rename from koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd rename to koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js index eccdba47eb..c02e700db2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js @@ -205,7 +205,7 @@ function changeH4Result(form, h4_result, tr_result, pos, value) { this.xmlDoc = $.ajax({ type: "GET", - url: this.themelang + "/modules/cataloguing/value_builder/marc21_field_" + this.tagfield + ".xml", + url: this.themelang + "/data/marc21_field_" + this.tagfield + ".xml", dataType: "xml", async: false }).responseXML; -- 2.39.5