From 4dfaaaffdadc58be88736f42091b1bb01a508341 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 20 Apr 2015 15:39:45 -0300 Subject: [PATCH] Bug 14006: about.pl checks the wrong zebra index mode This trivial patch makes the about page correctly test for configuration mismatches. Specifically it fixes the situation in which the koha-config.xml file points to zebra-biblios-dom.xml but has 'zebra_bib_index_mode' set to grs1. The test incorrectly queried for 'zebra_auth_index_mode' being set to grs1.' To test: - Have a DOM setup. - Change koha-conf.xml so zebra_bib_index_mode = grs1 => FAIL: No configuration missmatch is shown. - Apply the patch - Reload the about page => SUCCESS: A zebra configuration missmatch is shown. --- about.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/about.pl b/about.pl index 709a667..cf8ab4f 100755 --- 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' }; -- 2.3.5