Bug 11009: (follow-up) tweak wording and remove potential log noise
authorGalen Charlton <gmc@esilibrary.com>
Tue, 10 Dec 2013 20:20:37 +0000 (20:20 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 10 Dec 2013 20:20:37 +0000 (20:20 +0000)
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>
koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt
members/readingrec.pl

index 47ed060..740fd3f 100644 (file)
@@ -48,7 +48,7 @@
 <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 %]
index 2a57c42..2cb9437 100755 (executable)
@@ -65,7 +65,9 @@ my $order = 'date_due desc';
 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);