[Koha-bugs] [Bug 7995] upload patron images permission needed to upload offline circ

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jun 19 18:50:13 CEST 2012


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7995

Albert Oller <ago at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ago at bywatersolutions.com

--- Comment #1 from Albert Oller <ago at bywatersolutions.com> ---
Hi, 

same problem with 3.8

missing unzip fixed with : sudo apt-get install unzip

current 3.8 picture-upload.pl gives this error:

Patron image failed to upload

    Unpacking completed
    1 directories scanned.
    1 directories processed.

    - Cardnumber:
    WARNING: This image not imported because the cardnumber and filename is
missing.

installed the older picture-upload.pl and it now works fine.


Here's the diff of the two:  (picture-upload.pl.orig = 3.8 version)

kohaclone/tools$ diff picture-upload.pl picture-upload.pl.orig 
61c61
< picture-upload.p. - Script for handling uploading of both single and bulk
patronimages and importing them into the database.
---
> picture-upload.pl - Script for handling uploading of both single and bulk patronimages and importing them into the database.
81c81,84
<     my $filesuffix = $1 if $uploadfilename =~ m/(\..+)$/i;
---
>     my $filesuffix;
>     if ( $uploadfilename =~ m/(\..+)$/i ) {
>         my $filesuffix = $1;
>     }
98c101
<             unless (system("unzip $tempfile -d $dirname") == 0) {
---
>             unless (system("unzip", $tempfile,  '-d', $dirname) == 0) {
257,258c260,264
<                 my $dberror = PutPatronImage($cardnumber,$mimetype, $imgfile)
if $mimetype;
<                 if ( !$dberror && $mimetype ) { # Errors from here on are
fatal only to the import of a particular image, so don't bail, just note the
error and keep going
---
>                 my $dberror;
>                 if ($mimetype) {
>                     $dberror = PutPatronImage( $cardnumber, $mimetype, $imgfile );
>                 }
>                 if ( !$dberror && $mimetype ) { # Errors from here on are fatal only to the import of a particular image, so don't bail, just note the error and keep going
298,299d303
< 
< =back

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list