This patch makes the message that is displayed when attempting to
view circ history for the anonymous patron more informative. It
also removes a potential source of log noise if the AnonymousPatron
system preference happens to be set to a blank value.
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
<h1>Circulation history</h1>
[% IF is_anonymous %]
- <div class="dialog alert">This is the anonymous patron.</div>
+ <div class="dialog alert">This is the anonymous patron, so no circulation history is displayed. To get a list of anonymized loans, please run a report.</div>
[% ELSIF ( !loop_reading ) %]
<div class="dialog message">This patron has no circulation history.</div>
[% ELSE %]
my $limit = 0;
my $issues = ();
# Do not request the old issues of anonymous patron
-if ( $borrowernumber == C4::Context->preference('AnonymousPatron') ){
+if ( $borrowernumber eq C4::Context->preference('AnonymousPatron') ){
+ # use of 'eq' in the above comparison is intentional -- the
+ # system preference value could be blank
$template->param( is_anonymous => 1 );
} else {
$issues = GetAllIssues($borrowernumber,$order,$limit);