From 721a77e6696c26efedd1955569a00e1dff2aa6b8 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 5 Jun 2015 08:06:29 -0400 Subject: [PATCH] Bug 14338: Unable to delete patron images The call to RmPatronImage is still passing cardnumber as its parameter instead of borrowernumber. Test Plan: 1) Upload a patron image 2) Ensure the card number is not the same as the borrower number 3) Attempt to delete patron image -- Image will remain 4) Apply this patch 5) Attempt to delete patron image -- Image will be removed 6) run koha qa test tools Signed-off-by: Mark Tompsett Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt | 2 +- tools/picture-upload.pl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index 8ddb526a3f..e3ca832875 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -280,7 +280,7 @@ function validate1(date) {
- [% IF ( picture ) %]Delete[% END %] + [% IF ( picture ) %]Delete[% END %]
diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl index 3ae4f6284f..0d753d80b8 100755 --- a/tools/picture-upload.pl +++ b/tools/picture-upload.pl @@ -157,8 +157,8 @@ elsif ( ( $op eq 'Upload' ) && !$uploadfile ) { $template->param( filetype => $filetype ); } elsif ( $op eq 'Delete' ) { - my $dberror = RmPatronImage($cardnumber); - $debug and warn "Patron image deleted for $cardnumber"; + my $dberror = RmPatronImage($borrowernumber); + $debug and warn "Patron image deleted for $borrowernumber"; warn "Database returned $dberror" if $dberror; } if ( $borrowernumber && !%errors && !$template->param('ERRORS') ) { -- 2.39.5