Commit graph

44 commits

Author SHA1 Message Date
721a77e669 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 <mtompset@hotmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-06-11 10:08:59 -03:00
Jonathan Druart
ba0f84b46c Bug 9978: (followup) Replace license header with the correct license (GPLv3+)
There was another form of the v2.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-04-20 09:59:43 -03:00
Jonathan Druart
e20270fec4 Bug 11944: use CGI( -utf8 ) everywhere
Signed-off-by: Paola Rossi <paola.rossi@cineca.it>
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Signed-off-by: Dobrica Pavlinusic <dpavlin@rot13.org>

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2015-01-13 13:07:21 -03:00
Mark Tompsett
81445f9e88 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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:30:27 -03:00
4997454606 Bug 9312: Followup for one tab character
To satisfy qa tools, removing one tab somewhere..

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Sometimes our QA tools are pretty annoying, in cases like this, when its a
tab in a comment, .. I don't think we really need to hold up a patch
set for it

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:30:23 -03:00
Galen Charlton
6f17c68a24 Bug 9312: fix a couple more uninitialized variable warnings
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:30:21 -03:00
Fridolyn SOMERS
694b56a9ce Bug 9312: Perltidying picture-upload.pl
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:30:19 -03:00
Fridolyn SOMERS
696c9feee2 Bug 9312: strict perl for picture-upload.pl
Testing - this is a code-cleanup patch, so the purpose
of testing is to ensure that patron image upload functionality
still works.  To test:

- Turn on the patronimages system preference
- Go to Tools | Upload patron images and import a suitable image
  for a test patron.
- Bring up the test patron and verify that the image is attached.
- From the patron details page, upload a replacement image.
- Create a patron image ZIP file containing at least two images (
  per the documentation of the patron image feature) and load it
  via the patron image import tool.
- Verfiy that the test patrons now have images.
- Verify that tools/picture-upload.pl didn't report any errors
  in the Apache error log.

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-07 11:30:17 -03:00
afd2418d73 Bug 11349: Change .tmpl -> .tt in scripts using templates
Since we switched to Template Toolkit we don't need to stick with the
sufix we used for HTML::Template::Pro.

This patch changes the occurences of '.tmpl' in favour of '.tt'.

To test:
- Apply the patch
- Install koha, and verify that every page can be accesed

Regards
To+

P.S. a followup will remove the glue code.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-07-17 11:05:49 -03:00
09b8ce2a5f Bug 10636 - patronimage should have borrowernumber as PK, not cardnumber
Test Plan:
1) Apply this patch
2) Run updatedatabase.pl
3) Enable patronimages
4) Verify patron images are still displaying correctly
5) Test deleting a patron image
6) Test adding a patron image from moremember.pl
7) Test adding a patron image from tools/picture-upload.pl

Signed-off-by: Srdjan <srdjan@catalyst.net.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 21:08:02 +00:00
Jared Camins-Esakov
75703cf604 Bug 9421: tools/picture-upload.pl not Plack-compatible
This patch avoids using file-level private variables in subroutines
by passing the needed variables as parameters to the subroutines.

To test (under Plack):
1) Try uploading a patron image without applying the patch. Notice
   it fails.
2) Apply patch.
3) Try uploading a patron image again, noticing this time it succeeds.

To test (under Apache):
1) Apply patch.
2) Try uploading a patron image, confirm that it works.

Signed-off-by: Mirko Tietgen <mirko@abunchofthings.net>
Fixes Plack, does not break Apache. Works as expected.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
2013-02-06 12:35:46 -05:00
Ivan Brown
065acad78f Bug 7643 - Can't upload and import zipped file of patron images
Fixed problem with re-declaration of $filesuffix

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
patch pushed onto master directly, doesn't merge properly from
new/bug_7643 branch
2012-10-12 16:31:46 +02:00
Colin Campbell
b5b71339f3 Bug 5453 Move declarations out of conditionals
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-07-15 15:50:23 +12:00
Andrew Elwell
efa66f1f55 Bug 5385: POD Cleanups (part 2)
More podchecker cleanups to eliminate warnings / errors

Signed-off-by: Andrew Elwell <Andrew.Elwell@gmail.com>
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2010-11-12 10:06:56 +13:00
8eb7e1cbf7 further correction to the invocation of unzip
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 19:55:01 -04:00
Ian Walls
1125f4f432 Tighten system call to unzip
Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-10-06 19:22:41 -04:00
Donovan Jones
44201a54e1 Bug 2505 - Add commented use warnings where missing in the tools/ directory 2010-04-21 20:26:38 +12:00
Chris Nighswonger
f86b788e3b Bugfix: Upping the byte size limit of patron images
This brings it more in line with the size limit placed on other images
uploaded for use on patron cards.

Signed-off-by: Galen Charlton <gmcharlt@gmail.com>
2010-02-03 15:11:23 -05:00
Chris Nighswonger
3b1d56ccb5 [4/30] Modifications to picture upload script to accommodate image sizes up to 200 X 300 pixel dimesions.
This also changes the storage image format to PNG which is lossless (an important factor when using these
images for patroncards).

NOTE: In the end, this script was *not* used for uploading images for patron cards. However, these changes
are left as an improvement upon this script which is used for patron image uploads.

This script could be greatly reduced in size by using Graphics::Magick and working along the same lines
as the upload code found in patroncards/image-manage.pl
2010-01-11 18:16:17 -05:00
Ryan Higgins
04c4be5b48 Bug 2622 & 2623 : tools permissions for edit notice triggers and picture upload overly restrictive
removing requirements for parameters &  management respectively for these two tools.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
2008-10-16 14:47:31 -05:00
Chris Nighswonger
1baf6348cc kohabug 2404 This patch removes Image::Magick and adds GD
This patch removes Image::Magick as a dependency and replaces it with
the (much) lighter GD. Functionality of patronimage code has not changed with
this conversion.

Adding errorhandling for corrupted image file and link to return to moremember.pl when called from there

Added notes about supported image mime types.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-30 03:38:18 -05:00
Chris Nighswonger
af288205f5 kohabug 2154 Modifying form input controls to accomodate translations
Due to the logic of the underlying picture-upload.pl depending upon the "value" of the
form input controls and this value being translated, the script then failed to function.
This patch changes the input controls so that this should not be an issue.

This issue should be kept in mind, though, so that it can be avoided in the future.

Signed-off-by: Galen Charlton <galen.charlton@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-07-25 08:56:10 -05:00
Chris Nighswonger
e15e2f9118 Bugfix: Handling cases where the image is the correct pixel dimensions
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-11 16:54:54 -05:00
Galen Charlton
fc6ccb1a61 granular permissions - updated Tools
Updated all scripts appearing on the tools page
to respect a granular permission defined for
each of them.

The tools menu and home page have been changed so
that only the specific tools that a user has
access are displayed.  This is simple, but depending on
the module and circumstance, it may be better to
display functions that the user has does not have
access to, but disable the links and do some sort
of visual styling to indicate that a function exists
but requires additional privileges to access.

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 15:53:30 -05:00
Chris Nighswonger
7fbcb6a784 Bugfix: Correcting misspelled variable
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:59:22 -05:00
Chris Nighswonger
a16d450555 Adding use of C4::Debug for debugging
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-10 02:59:21 -05:00
Chris Nighswonger
9a55637760 NOTE: REQUIRES INSTALLATION OF Image::Magick; Adding image scaling/resizing capability to picture-upload.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-08 17:00:05 -05:00
Chris Nighswonger
b626a8bb9a Adding file size limit to picture-upload.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-04-01 06:44:17 -05:00
Chris Nighswonger
55b353f79a Adding Update/Delete functions to patron image management on Details page
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-06 12:14:44 -06:00
Chris Nighswonger
cbc5bbccdd Correction to handle errors processing image file passed in from the patron details screen.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-06 06:25:15 -06:00
Chris Nighswonger
6b89cda969 Completing adding patronimage upload form to patron details screen.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-03-06 06:25:13 -06:00
bfbae81162 Some changes related to recent commits to patron images: Markup and javascript changes for upload form; Enabling passing of cardnumber and filetype variable to picture upload form; changes to picture display to handle missing image; Adding link to picture upload form from missing image display in circ and moremember; Removal of English text from 'no patron image' file.
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-27 09:02:37 -06:00
Chris Nighswonger
9771c038b0 Bugfix: Removing Dumper() call
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 11:08:43 -06:00
Chris Nighswonger
de1754d68d Third installment on moving patronimages into the database.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 10:55:44 -06:00
Chris Nighswonger
06575bbcb8 Fixing error trap routine in picture-upload.pl
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 10:55:43 -06:00
Chris Nighswonger
4b232a0c36 Second installment on moving patronimages into the database
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 10:55:41 -06:00
Chris Nighswonger
1c1cb10e5e First installment on moving patronimages into the database.
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-23 10:55:37 -06:00
Chris Nighswonger
e4b90465a8 Second fix for bug 1848 correcting bad conditional
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-20 05:41:39 -06:00
Chris Nighswonger
5e90496cad Making picture-upload.pl case insensitive when looking for DATALINK.TXT or IDLINK.TXT
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-18 16:44:04 -06:00
Chris Nighswonger
a0b51ee25f Correcting DEBUG var
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-03 07:23:46 -06:00
Chris
80d4bd222f Bugfix for Bug 1618: First Installment
This corrects the major template issues once files are uploaded.
The changes need dressing up a bit still.

Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2008-02-03 07:23:41 -06:00
Joe Atzberger
2e0e56a016 tools subdir - Dates.pm integration and warnings fixes.
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-12-04 18:01:30 -06:00
Joshua Ferraro
defb2eec57 adding a pre-check for patronimages/ dir, which won't be there by
default

Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:27:52 -06:00
Joshua Ferraro
b6399e62c1 adding back patron images upload, no idea why it was removed
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
2007-11-25 16:27:10 -06:00