my $warnIsRootUser = (! $loggedinuser);
my $warnNoActiveCurrency = (! defined C4::Budgets->GetCurrency());
+my @xml_config_warnings;
+
+if ( ! defined C4::Context->config('zebra_bib_index_mode') ) {
+ push @xml_config_warnings, {
+ error => 'zebra_bib_index_mode_warn'
+ };
+}
+
+if ( ! defined C4::Context->config('zebra_auth_index_mode') ) {
+ push @xml_config_warnings, {
+ error => 'zebra_auth_index_mode_warn'
+ };
+}
$template->param(
kohaVersion => $kohaVersion,
errZebraConnection => $errZebraConnection,
warnIsRootUser => $warnIsRootUser,
warnNoActiveCurrency => $warnNoActiveCurrency,
+ xml_config_warnings => \@xml_config_warnings,
);
my @components = ();
<tr><th scope="row"><b>Warning</b> </th><td>No active currency is defined. Please go to <a href="/cgi-bin/koha/admin/currency.pl">Administration > Currencies and exchange rates</a> and mark one currency as active.</td></tr>
[% END %]
</table>
+ [% ELSIF xml_config_warnings.size %]
+ <table>
+ <caption>XML configuration file</caption>
+ [% FOREACH config_entry IN xml_config_warnings %]
+ [% IF config_entry.error == 'zebra_bib_index_mode_warn' %]
+ <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_bib_index_mode> entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>grs1</strong> but this could change in the future.</td></tr>
+ [% ELSIF config_entry.error == 'zebra_auth_index_mode_warn' %]
+ <tr><th scope="row"><b>Warning</b> </th><td>The <zebra_auth_index_mode> entry is missing in your configuration file. It should be set to <strong>dom</strong> or <strong>grs1</strong>. It will default to <strong>dom</strong> but this could change in the future.</td></tr>
+ [% END %]
+ [% END %]
+ </table>
[% ELSE %]
<p>No warnings</p>
[% END %]