From c767c99051c5a30c8f3e9151d4351f0adff3e50c Mon Sep 17 00:00:00 2001 From: Chris Nighswonger Date: Thu, 6 Mar 2008 09:05:58 -0500 Subject: [PATCH] Correcting code to display patronimage correctly Signed-off-by: Joshua Ferraro --- circ/circulation.pl | 6 +++--- .../intranet-tmpl/prog/en/modules/circ/circulation.tmpl | 7 ------- members/boraccount.pl | 5 ++--- members/readingrec.pl | 5 ++--- tools/viewlog.pl | 4 ++-- 5 files changed, 9 insertions(+), 18 deletions(-) diff --git a/circ/circulation.pl b/circ/circulation.pl index 943656aa5e..fcaf8edbdb 100755 --- a/circ/circulation.pl +++ b/circ/circulation.pl @@ -697,9 +697,9 @@ if ($stickyduedate) { #$cookie=[$cookie, $branchcookie, $printercookie]; #} -# grab patron's image if available -my $picture = GetPatronImage($borrower->{'cardnumber'}); -$template->param( picture => $picture ); +my ($picture, $dberror) = GetPatronImage($borrower->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; + $template->param( SpecifyDueDate => C4::Context->preference("SpecifyDueDate"), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl index 1e0c697eed..d0b54dffb5 100755 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tmpl @@ -552,11 +552,4 @@ No patron matched - diff --git a/members/boraccount.pl b/members/boraccount.pl index 0492f6203c..fa133d4c2d 100755 --- a/members/boraccount.pl +++ b/members/boraccount.pl @@ -90,9 +90,8 @@ my $borrowercategory = GetBorrowercategory( $data->{'categorycode'} ); my $category_type = $borrowercategory->{'category_type'}; ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' ); -# grab patron's image if available -my $picture = GetPatronImage($data->{'cardnumber'}); -$template->param( picture => $picture ); +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; $template->param( finesview => 1, diff --git a/members/readingrec.pl b/members/readingrec.pl index 2bf921d912..e47b5f65c7 100755 --- a/members/readingrec.pl +++ b/members/readingrec.pl @@ -83,9 +83,8 @@ if (! $limit){ $limit = 'full'; } -# grab patron's image if available -my $picture = GetPatronImage($data->{'cardnumber'}); -$template->param( picture => $picture ); +my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); +$template->param( picture => 1 ) if $picture; $template->param( readingrecordview => 1, diff --git a/tools/viewlog.pl b/tools/viewlog.pl index 7563f8dc97..7ae10e29b9 100755 --- a/tools/viewlog.pl +++ b/tools/viewlog.pl @@ -73,7 +73,8 @@ if ($src eq 'circ') { # if we were called from circulation, use the circulatio use C4::Members; my $borrowernumber = $object; my $data = GetMember($borrowernumber,'borrowernumber'); - my $picture = GetPatronImage($data->{'cardnumber'}); + my ($picture, $dberror) = GetPatronImage($data->{'cardnumber'}); + $template->param( picture => 1 ) if $picture; $template->param( menu => 1, title => $data->{'title'}, initials => $data->{'initials'}, @@ -89,7 +90,6 @@ if ($src eq 'circ') { # if we were called from circulation, use the circulatio phonepro => $data->{'phonepro'}, email => $data->{'email'}, branchcode => $data->{'branchcode'}, - picture => $picture, ); } -- 2.20.1