Bugzilla – Attachment 52483 Details for
Bug 16747
Fix regression in patron card creator (patron image)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16747 - Patron card creator broken with version 16.05
Bug-16747---Patron-card-creator-broken-with-versio.patch (text/plain), 2.16 KB, created by
Kyle M Hall (khall)
on 2016-06-17 14:19:08 UTC
(
hide
)
Description:
Bug 16747 - Patron card creator broken with version 16.05
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-06-17 14:19:08 UTC
Size:
2.16 KB
patch
obsolete
>From 51d0526e2f2cb8c1ac68c7b86f7391ee15ae3dab Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Thu, 16 Jun 2016 09:27:55 +0200 >Subject: [PATCH] Bug 16747 - Patron card creator broken with version 16.05 > >To reproduce: >- Prepare a patron car layout with Image 1 using Patron Image >- Create a patron card for a patron without patron image >Result: OK, PDF can be opened wit PDF viewer >- Try to create a patron card with a patron who has a patron image >Result: The PDF file is corrupt (contains text only with error message) > intranet error log contains: create-pdf.pl: Illegal division > by zero at /usr/share/kohaclone/patroncards/create-pdf.pl line 200 >To test: >- Apply patch >- Create a patron card with a patron who has a patron image >Result: PDF is OK and contains the image > >Bonus test: Do the same with a card layout with an additional image >(Image 2: Image source: Other image) > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >Test and bonus test pass: PDF generated without errors. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > patroncards/create-pdf.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/patroncards/create-pdf.pl b/patroncards/create-pdf.pl >index 6d352b4..1811f0f 100755 >--- a/patroncards/create-pdf.pl >+++ b/patroncards/create-pdf.pl >@@ -158,7 +158,12 @@ foreach my $item (@{$items}) { > } > elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'patronimages') { > my $patron_image = Koha::Patron::Images->find($borrower_number); >- warn sprintf('No image exists for borrower number %s.', $borrower_number) unless $patron_image; >+ if ($patron_image) { >+ $image_data->{'imagefile'} = $patron_image->imagefile; >+ } >+ else { >+ warn sprintf('No image exists for borrower number %s.', $borrower_number); >+ } > next PROCESS_IMAGES unless $patron_image; > } > elsif ($images->{$_}->{'data_source'}->[0]->{'image_source'} eq 'creator_images') { >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16747
:
52454
|
52481
| 52483