use C4::Installer;
use Koha;
+use Koha::Borrowers;
use Koha::Config::SysPrefs;
#use Smart::Comments '####';
and not C4::Context->preference('AnonymousPatron')
);
+my $anonymous_patron = Koha::Borrowers->find( C4::Context->preference('AnonymousPatron') );
+my $warnPrefAnonymousPatron_PatronDoesNotExist = ( not $anonymous_patron and Koha::Borrowers->search({ privacy => 2 })->count );
+
my $errZebraConnection = C4::Context->Zconn("biblioserver",0)->errcode();
my $warnIsRootUser = (! $loggedinuser);
warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities,
warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords,
warnPrefAnonymousPatron => $warnPrefAnonymousPatron,
+ warnPrefAnonymousPatron_PatronDoesNotExist => $warnPrefAnonymousPatron_PatronDoesNotExist,
errZebraConnection => $errZebraConnection,
warnIsRootUser => $warnIsRootUser,
warnNoActiveCurrency => $warnNoActiveCurrency,
[% IF warnPrefAnonymousPatron %]
<tr><th scope="row"><b>Warning</b> </th><td>System preference 'OPACPrivacy' set, but AnonymousPatron preference is set to '0'. Set it to a valid borrower number if you want that this feature works correctly.</td></tr>
[% END %]
+ [% IF warnPrefAnonymousPatron_PatronDoesNotExist %]
+ <tr><th scope="row"><b>Warning</b> </th><td>Some patrons have requested a privacy on returning item but the AnonymousPatron pref is not set correctly. Set it to a valid borrower number if you want that this feature works correctly.</td></tr>
+ [% END %]
[% IF warnNoActiveCurrency %]
<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 %]