Browse Source

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 <gmc@esilibrary.com>
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Also verified translation of those plugins still works correctly.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
new/bootstrap-opac
Galen Charlton 11 years ago
parent
commit
9eb13aa3cd
  1. 2
      cataloguing/value_builder/marc21_field_006.pl
  2. 2
      cataloguing/value_builder/marc21_field_008.pl
  3. 0
      koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml
  4. 0
      koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml
  5. 0
      koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd
  6. 2
      koha-tmpl/intranet-tmpl/prog/en/js/xmlControlfield.js

2
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') {

2
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') {

0
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_006.xml → koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_006.xml

0
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_008.xml → koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_008.xml

0
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/value_builder/marc21_field_CF.xsd → koha-tmpl/intranet-tmpl/prog/en/data/marc21_field_CF.xsd

2
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;

Loading…
Cancel
Save