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 <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: Mason James <mtj@kohaaloha.com>
This commit is contained in:
Tomas Cohen Arazi 2015-04-20 15:39:45 -03:00 committed by Mason James
parent 94683b9eac
commit 52b368a921
1 changed files with 31 additions and 0 deletions

View File

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