Bug 17989: Centralize bad template check
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 30 Jan 2017 07:43:45 +0000 (08:43 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Wed, 1 Nov 2017 16:10:17 +0000 (13:10 -0300)
commit411d0cf8ead451099704237549a899bb216aece3
tree34ab83c9e2e54ddba4f923ae8876aa581cae199d
parent264f69651091350d588a2fa8f2ff05f006126096
Bug 17989: Centralize bad template check

The bad template check in get_template_and_user can be removed, since
this check has been added in gettemplate on bug 18010.

The check moves here to a new sub in C4::Templates. And will be extended
in a follow-up.

Removed unused variable $path in gettemplatefile.

Test plan:
[1] Run t/db_dependent/Auth.t (get_template_and_user bad calls).
[2] Run t/db_dependent/Templates.t (bad call to gettemplate).

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Auth.pm
C4/Templates.pm
Koha/Exceptions.pm