Bug 20272: Changes for Breeding.pm and Record.pm
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 22 Feb 2018 14:46:12 +0000 (15:46 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 2 Jul 2018 12:12:49 +0000 (12:12 +0000)
commitf253c72bc38482301de4aa4267ddf4d214dce6a1
tree7cfff5c2f912cd2bcf71e179bec424fc9b1c0b40
parent295ae33800a322facfdf56795f4c02b2fd53432b
Bug 20272: Changes for Breeding.pm and Record.pm

In Breeding.pm we let Z3950Search return the xslt handler error codes back
to the template. They are converted to text messages by using an new include
file (added for opac and intranet now). The generic xslt_err code is now
obsoleted.

In Record.pm the errstr call is removed. The croak is done with the new
error code in err. This seems sufficient.

Test plan:
[1] Run Breeding.t
[2] Run Record.t
[3] Add a nonexisting xslt file to one of your Z3950 targets. Search on that
    target and check if you see a error 'XSLT file not found'.

The bonus is these error messages are now translatable as they are in
the templates

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

Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
C4/Breeding.pm
C4/Record.pm
koha-tmpl/intranet-tmpl/prog/en/includes/xslt-handler.inc [new file with mode: 0644]
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/z3950_search.tt
koha-tmpl/opac-tmpl/bootstrap/en/includes/xslt-handler.inc [new file with mode: 0644]
t/db_dependent/Breeding.t