X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=members%2Freadingrec.pl;h=2cb9437591f944660eec02e2d1a96f5f86bb57d1;hb=e0bba7040f058135e7008410fd99653c059e96fe;hp=d41e3f9818f5232bfdf5fb941f7709e8253ce44c;hpb=a4e804fceb6061d1e3c4f404a1b08649cf71563c;p=koha_fer diff --git a/members/readingrec.pl b/members/readingrec.pl index d41e3f9818..2cb9437591 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -63,7 +63,15 @@ if ($input->param('borrowernumber')) { my $order = 'date_due desc'; my $limit = 0; -my $issues = GetAllIssues($borrowernumber,$order,$limit); +my $issues = (); +# Do not request the old issues of anonymous patron +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); +} my $branches = GetBranches(); foreach my $issue ( @{$issues} ) { @@ -103,7 +111,7 @@ if (! $limit){ } -my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +my ($picture, $dberror) = GetPatronImage($data->{'borrowernumber'}); $template->param( picture => 1 ) if $picture; if (C4::Context->preference('ExtendedPatronAttributes')) {