]> git.koha-community.org Git - koha.git/commit
Bug 9924: (follow-up) ensure that correct error message is displayed
authorGalen Charlton <gmc@esilibrary.com>
Sun, 8 Sep 2013 07:37:04 +0000 (07:37 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Sun, 8 Sep 2013 19:19:50 +0000 (19:19 +0000)
commit46bbfa12a1d20cfaea2c61ad9bf1fdb47a25435a
treee70b0273a7310385a716789bf89d840946dad33c
parent3d8f462cce3779fd1963d623b051dbc79d2f799a
Bug 9924: (follow-up) ensure that correct error message is displayed

(Apparently) unlike HTML::Template::Pro, Template Toolkit doesn't like
template variables that are entirely numeric -- in conditionals, it
consider them integers, most of which are Perl true.

This patch changes this by setting the error variable to the error
value.

To test:

[1] Run the test plan from the previous patch.  In each
    case, verify that the error message is specifically applicable
    to the test.  For example, if you try uplaoading a patron image
    that is larger than 500KB, the error message displayed should
    specifically say so.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Thank you Galen for catching this. Error messages showing up
now are much more specific and according to the error codes given.
I testd uploading a file larger then 500KB and triggered several
error messages giving the error code in the URL:
/cgi-bin/koha/patroncards/manage.pl?card_element=profile&error=201

All tests and QA script pass.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
koha-tmpl/intranet-tmpl/prog/en/includes/patroncards-errors.inc
patroncards/edit-batch.pl
patroncards/image-manage.pl
patroncards/manage.pl