From 01696081b1e8a53222af401423fc73cc71207537 Mon Sep 17 00:00:00 2001 From: Srdjan Date: Wed, 30 Mar 2016 17:34:45 +1300 Subject: [PATCH] bug_15562: Revert "Bug 13690: use Koha::Schema only when it's needed" This reverts commit c52bc9756a5fa1e4f6bba7ce5c58124f150c5efc. I don't see any place where we would use KOha::Database without wanting Koha::Schema. require Koha::Schema interferes with some plack setups - for some reason it calls C4::Context->import() even when C4::Context is already used. Signed-off-by: Kyle M Hall --- Koha/Database.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Koha/Database.pm b/Koha/Database.pm index 7daf5f0..26d1c96 100644 --- a/Koha/Database.pm +++ b/Koha/Database.pm @@ -35,6 +35,7 @@ Koha::Database use Modern::Perl; use Carp; use C4::Context; +use Koha::Schema; use base qw(Class::Accessor); use vars qw($database); @@ -47,8 +48,6 @@ __PACKAGE__->mk_accessors(qw( )); # returns it. sub _new_schema { - require Koha::Schema; - my $context = C4::Context->new(); my $db_driver = $context->{db_driver}; -- 2.7.4