From 93d6de4bf025c33f48ec9b2d4de72f49135ae6d7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 28 Oct 2015 08:58:15 +0000 Subject: [PATCH] Bug 14100: Fix test xt/author/valid_templates complaining on opac-topissues.tt undef error - Undefined subroutine &C4::Languages::getlanguage called at C4/Koha.pm line 250. Test plan: prove xt/author/valid-templates.t Signed-off-by: Tomas Cohen Arazi --- C4/Koha.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Koha.pm b/C4/Koha.pm index 82e80e3eeb..0a90bb3215 100644 --- a/C4/Koha.pm +++ b/C4/Koha.pm @@ -247,6 +247,7 @@ sub GetItemTypes { my ( %params ) = @_; my $style = defined( $params{'style'} ) ? $params{'style'} : 'hash'; + require C4::Languages; my $language = C4::Languages::getlanguage(); # returns a reference to a hash of references to itemtypes... my %itemtypes; @@ -549,6 +550,7 @@ Defaults to intranet. sub getitemtypeinfo { my ($itemtype, $interface) = @_; my $dbh = C4::Context->dbh; + require C4::Languages; my $language = C4::Languages::getlanguage(); my $it = $dbh->selectrow_hashref(q| SELECT -- 2.39.5