]> git.koha-community.org Git - koha.git/commit
Bug 19633: Use alphanumeric error codes in upload
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 22 Feb 2018 10:52:14 +0000 (11:52 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Fri, 10 Aug 2018 10:10:46 +0000 (10:10 +0000)
commit15fd90dcbc98cae6febfeab59df679b761111d42
treed94fa443b42a3fbda3522ca05e7e0bc9d03cbf32
parent6ff01e3543fbe6f39739b01b64d2e0073cec75d5
Bug 19633: Use alphanumeric error codes in upload

The error codes 1 to 7 are used in Uploader.pm or tools/upload.pl.
It would be nice to use alphanumeric codes instead.
No behavior change expected.

Test plan:
[1] Run t/db_dependent/Upload.t
[2] Verify that a regular upload with tools/upload.pl still works.
[3] Rename upload_path in your koha-conf.xml. Restart Plack, flush the cache
    and try to upload to a category. Correct error message?
[4] Upload the same file twice to the same category.
    Correct error message the second time?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Bug 19633: (QA follow-up) Really remove these ugly numbers

See BZ comment5. We now remove the numbers also from the constant names.

Test plan:
Read the changes.
Git grep "ERRCODE_"
Run t/db_dependent/Upload.t (Note: You may see one failure here; it is fixed
on bug 20727. So depends on who reaches master first.)

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Koha/Uploader.pm
koha-tmpl/intranet-tmpl/prog/en/modules/tools/upload.tt
t/db_dependent/Upload.t
tools/upload.pl