From d4da37fb89031a76fc287e9264636c25919724dd Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Wed, 28 Oct 2015 08:58:15 +0000
Subject: [PATCH] Bug 14931: 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
---
 C4/Koha.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/C4/Koha.pm b/C4/Koha.pm
index 82e80e3..0a90bb3 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.1.0