Bugzilla – Attachment 33355 Details for
Bug 9312
strict perl for picture-upload.pl
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[SIGNED-OFF] Bug 9312: Resolve error triggered by mutli-type return value.
SIGNED-OFF-Bug-9312-Resolve-error-triggered-by-mut.patch (text/plain), 2.16 KB, created by
Bernardo Gonzalez Kriegel
on 2014-11-07 01:11:17 UTC
(
hide
)
Description:
[SIGNED-OFF] Bug 9312: Resolve error triggered by mutli-type return value.
Filename:
MIME Type:
Creator:
Bernardo Gonzalez Kriegel
Created:
2014-11-07 01:11:17 UTC
Size:
2.16 KB
patch
obsolete
>From 114973278d3806eae5686b9ca1f89a026e214603 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Sun, 26 Oct 2014 22:43:08 -0400 >Subject: [PATCH] [SIGNED-OFF] Bug 9312: Resolve error triggered by mutli-type > return value. > >$results is 1 upon success or a hash on failure. >Rather than check %$results || %error, I changed it to >$results!=1 || %error. Strangely, this works without >messy warnings. I believe this resolves the problem Katrin >mentions in comment #43. > >TEST PLAN >--------- >0) Make sure the system preference patronimages is set to Allow. >1) Apply all the patches >2) Login to staff client >3) Tools -> Upload patron images (it's in the bottom left) >4) Choose an image file, browse for a photo, enter a patron #. >5) Click Upload >6) Click the card number link > -- the uploaded photo should be visible on the left side of > the screen. >7) Run koha qa test tools. > >Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> > >Image uploaded without problems >No koha-qa errors >--- > tools/picture-upload.pl | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/tools/picture-upload.pl b/tools/picture-upload.pl >index 82d09bc..b7d99d7 100755 >--- a/tools/picture-upload.pl >+++ b/tools/picture-upload.pl >@@ -74,8 +74,8 @@ $debug and warn "Operation requested: $op"; > > my ( $total, $handled, @counts, $tempfile, $tfh, %errors ); > >+# Case is important in these operational values as the template must use case to be visually pleasing! > if ( ( $op eq 'Upload' ) && $uploadfile ) { >- # Case is important in these operational values as the template must use case to be visually pleasing! > my $dirname = File::Temp::tempdir( CLEANUP => 1 ); > $debug and warn "dirname = $dirname"; > my $filesuffix; >@@ -129,11 +129,11 @@ if ( ( $op eq 'Upload' ) && $uploadfile ) { > #if ($filetype eq 'zip' ) > $results = handle_dir( $dirname, $filesuffix, $template, $cardnumber, > $tempfile ); >- $handled = 1; >+ $handled++ if $results == 1; > $total = 1; > } > >- if ( %$results || %errors ) { >+ if ( $results!=1 || %errors ) { > $template->param( ERRORS => [$results] ); > } > else { >-- >1.7.9.5
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 9312
:
14226
|
14227
|
14255
|
14256
|
14623
|
14624
|
14625
|
14626
|
18895
|
18896
|
18897
|
18936
|
18937
|
18938
|
20548
|
32753
|
32754
|
32755
|
32756
|
32759
|
32760
|
32761
|
32762
|
32781
|
33355
|
33362
|
33363
|
33364
|
33365
|
33366