@@ -, +, @@ patrons have requested privacy --- about.pl | 5 +++++ koha-tmpl/intranet-tmpl/prog/en/modules/about.tt | 3 +++ 2 files changed, 8 insertions(+) --- a/about.pl +++ a/about.pl @@ -34,6 +34,7 @@ use C4::Context; use C4::Installer; use Koha; +use Koha::Borrowers; use Koha::Config::SysPrefs; #use Smart::Comments '####'; @@ -77,6 +78,9 @@ my $warnPrefAnonymousPatron = ( 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); @@ -227,6 +231,7 @@ $template->param( warnPrefBiblioAddsAuthorities => $warnPrefBiblioAddsAuthorities, warnPrefEasyAnalyticalRecords => $warnPrefEasyAnalyticalRecords, warnPrefAnonymousPatron => $warnPrefAnonymousPatron, + warnPrefAnonymousPatron_PatronDoesNotExist => $warnPrefAnonymousPatron_PatronDoesNotExist, errZebraConnection => $errZebraConnection, warnIsRootUser => $warnIsRootUser, warnNoActiveCurrency => $warnNoActiveCurrency, --- a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/about.tt @@ -122,6 +122,9 @@ [% IF warnPrefAnonymousPatron %] Warning 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. [% END %] + [% IF warnPrefAnonymousPatron_PatronDoesNotExist %] + Warning 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. + [% END %] [% IF warnNoActiveCurrency %] Warning No active currency is defined. Please go to Administration > Currencies and exchange rates and mark one currency as active. [% END %] --