From 52b368a92171a91d0b108f9bfff7468721b948a8 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 When setting zebra_bib_index_mode to grs1 I get two warnings when not applying the patch: "The entry is set to grs1. GRS-1 support is now deprecated and will be removed in future releases. Please use DOM instead by setting to dom (full reindex required)." "You have set but the 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 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 Signed-off-by: Katrin Fischer Signed-off-by: Mason James --- about.pl | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/about.pl b/about.pl index 4687a45a3b..cb4f0df63a 100755 --- a/about.pl +++ b/about.pl @@ -80,10 +80,41 @@ my $warnIsRootUser = (! $loggedinuser); my $warnNoActiveCurrency = (! defined C4::Budgets->GetCurrency()); my @xml_config_warnings; +my $context = new C4::Context; + if ( ! defined C4::Context->config('zebra_bib_index_mode') ) { push @xml_config_warnings, { error => 'zebra_bib_index_mode_warn' }; + if ($context->{'server'}->{'biblioserver'}->{'config'} !~ /zebra-biblios-dom.cfg/) { + push @xml_config_warnings, { + error => 'zebra_bib_mode_seems_grs1' + }; + } + else { + push @xml_config_warnings, { + error => 'zebra_bib_mode_seems_dom' + }; + } +} else { + push @xml_config_warnings, { error => 'zebra_bib_grs_warn' } + 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/) ) { + + push @xml_config_warnings, { + error => 'zebra_bib_index_mode_mismatch_warn' + }; +} + +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' + }; } if ( ! defined C4::Context->config('zebra_auth_index_mode') ) { -- 2.39.5