Bug 9883 - Koha::Plugins::* should not require koha-conf to load - Followup - Load...
authorKyle M Hall <kyle@bywatersolutions.com>
Fri, 22 Mar 2013 11:40:36 +0000 (04:40 -0700)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Fri, 22 Mar 2013 13:52:26 +0000 (09:52 -0400)
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Unset KOHA_CONF variable and made sure t/00_load.t passed
Also ran Makefile.PL doing an update on my existing installation
and checked koha-conf.xml:

 <pluginsdir>/home/katrin/koha-dev/var/lib/plugins</pluginsdir>
 <enable_plugins>0</enable_plugins>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Koha/Plugins/Base.pm

index b4091b7..3a8dc63 100644 (file)
@@ -24,7 +24,6 @@ use Module::Pluggable require => 1;
 use base qw{Module::Bundled::Files};
 
 use C4::Context;
-use C4::Auth;
 
 =head1 NAME
 
@@ -104,6 +103,8 @@ C4:Template, but at the moment, it does not.
 sub get_template {
     my ( $self, $args ) = @_;
 
+    require C4::Auth;
+
     my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         {   template_name   => $self->mbf_path( $args->{'file'} ),
             query           => $self->{'cgi'},