Bug 14006: about.pl checks the wrong zebra index mode
authorTomas Cohen Arazi <tomascohen@gmail.com>
Mon, 20 Apr 2015 18:39:45 +0000 (15:39 -0300)
committerTomas Cohen Arazi <tomascohen@gmail.com>
Tue, 5 May 2015 18:38:52 +0000 (15:38 -0300)
When setting zebra_bib_index_mode to grs1 I get two warnings when not applying the patch:

"The <zebra_bib_index_mode> entry is set to grs1. GRS-1 support is now deprecated and will be removed in future releases. Please use DOM instead by setting <zebra_bib_index_mode> to dom (full reindex required)."

"You have set <use_zebra_facets> but the <zebra_bib_index_mode> is not set to dom. Falling back to legacy facet calculation."

When applying the patch a third warning appears in addition to the two previous ones:

"The <zebra_bib_index_mode> entry is set to dom, but your system still appears to be set up for grs1 indexing."

Seems like the patch does what it should to me regarding the configuration mismatch warning.

Signed-off-by: Eivin Giske Skaaren <eskaaren@yahoo.no>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>

about.pl

index 709a667..cf8ab4f 100755 (executable)
--- a/about.pl
+++ b/about.pl
@@ -101,13 +101,17 @@ if ( ! defined C4::Context->config('zebra_bib_index_mode') ) {
         if C4::Context->config('zebra_bib_index_mode') eq 'grs1';
 }
 
-if ( (C4::Context->config('zebra_bib_index_mode') eq 'dom') && ($context->{'server'}->{'biblioserver'}->{'config'} !~ /zebra-biblios-dom.cfg/) ) {
+if ( (C4::Context->config('zebra_bib_index_mode') eq 'dom') &&
+     ($context->{'server'}->{'biblioserver'}->{'config'} !~ /zebra-biblios-dom.cfg/) ) {
+
     push @xml_config_warnings, {
         error => 'zebra_bib_index_mode_mismatch_warn'
     };
 }
 
-if ( (C4::Context->config('zebra_auth_index_mode') eq 'grs1') && ($context->{'server'}->{'biblioserver'}->{'config'} =~ /zebra-biblios-dom.cfg/) ) {
+if ( (C4::Context->config('zebra_bib_index_mode') eq 'grs1') &&
+     ($context->{'server'}->{'biblioserver'}->{'config'} =~ /zebra-biblios-dom.cfg/) ) {
+
     push @xml_config_warnings, {
         error => 'zebra_bib_index_mode_mismatch_warn'
     };