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_auth_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') ) {
push @xml_config_warnings, {
error => 'zebra_auth_index_mode_warn'
};
+ if ($context->{'server'}->{'authorityserver'}->{'config'} !=~ /zebra-authorities-dom.cfg/) {
+ push @xml_config_warnings, {
+ error => 'zebra_auth_mode_seems_grs1'
+ };
+ }
+ else {
+ push @xml_config_warnings, {
+ error => 'zebra_auth_mode_seems_dom'
+ };
+ }
} else {
push @xml_config_warnings, { error => 'zebra_auth_grs_warn' }
if C4::Context->config('zebra_auth_index_mode') eq 'grs1';
}
+if ( (C4::Context->config('zebra_auth_index_mode') eq 'dom') && ($context->{'server'}->{'authorityserver'}->{'config'} !=~ /zebra-authorities-dom.cfg/) ) {
+ push @xml_config_warnings, {
+ error => 'zebra_auth_index_mode_mismatch_warn'
+ };
+}
+
+if ( (C4::Context->config('zebra_auth_index_mode') eq 'grs1') && ($context->{'server'}->{'authorityserver'}->{'config'} =~ /zebra-authorities-dom.cfg/) ) {
+ push @xml_config_warnings, {
+ error => 'zebra_auth_index_mode_mismatch_warn'
+ };
+}
+
# Test QueryParser configuration sanity
if ( C4::Context->preference( 'UseQueryParser' ) ) {
# Get the QueryParser configuration file name
It will default to <strong>dom</strong>.
</td>
</tr>
+ [% ELSIF config_entry.error == 'zebra_bib_mode_seems_grs1' %]
+ <tr>
+ <th scope="row"><b>Info</b></th>
+ <td>Your configuration file indicates that <strong>grs1</strong> is the correct setting
+ for <zebra_bib_index_mode>.
+ </td>
+ </tr>
+ [% ELSIF config_entry.error == 'zebra_bib_mode_seems_dom' %]
+ <tr>
+ <th scope="row"><b>Info</b></th>
+ <td>Your configuration file indicates that <strong>dom</strong> is the correct setting
+ for <zebra_bib_index_mode>.
+ </td>
+ </tr>
[% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %]
<tr>
<th scope="row"><b>Warning</b></th>
It will default to <strong>dom</strong>.
</td>
</tr>
+ [% ELSIF config_entry.error == 'zebra_auth_mode_seems_grs1' %]
+ <tr>
+ <th scope="row"><b>Info</b></th>
+ <td>Your configuration file indicates that <strong>grs1</strong> is the correct setting
+ for <zebra_auth_index_mode>.
+ </td>
+ </tr>
+ [% ELSIF config_entry.error == 'zebra_auth_mode_seems_dom' %]
+ <tr>
+ <th scope="row"><b>Info</b></th>
+ <td>Your configuration file indicates that <strong>dom</strong> is the correct setting
+ for <zebra_auth_index_mode>.
+ </td>
+ </tr>
[% ELSIF config_entry.error == 'zebra_bib_grs_warn' %]
<tr>
<th scope="row"><b>Warning</b></th>
<strong>dom</strong> (full reindex required).
</td>
</tr>
+ [% ELSIF config_entry.error == 'zebra_bib_index_mode_mismatch_warn' %]
+ <tr>
+ <th scope="row"><b>Warning</b></th>
+ <td>The <zebra_bib_index_mode> entry is set to <strong>dom</strong>, but your system appears to be set up for <strong>grs1</strong> indexing.
+ It is safe to ignore this warning if biblio search is working.
+ </td>
+ </tr>
[% ELSIF config_entry.error == 'zebra_auth_grs_warn' %]
<tr>
<th scope="row"><b>Warning</b></th>
<strong>dom</strong> (full reindex required).
</td>
</tr>
+ [% ELSIF config_entry.error == 'zebra_auth_index_mode_mismatch_warn' %]
+ <tr>
+ <th scope="row"><b>Warning</b></th>
+ <td>The <zebra_auth_index_mode> entry is set to <strong>dom</strong>, but your system appears to be set up for <strong>grs1</strong> indexing.
+ It is safe to ignore this warning if authority search is working.
+ </td>
+ </tr>
[% ELSIF config_entry.error == 'queryparser_entry_missing' %]
<tr>
<th scope="row"><b>Warning</b></th>