Lines 30-36
use C4::Context;
Link Here
|
30 |
use C4::Output; |
30 |
use C4::Output; |
31 |
use Koha::Plugins::Methods; |
31 |
use Koha::Plugins::Methods; |
32 |
|
32 |
|
33 |
BEGIN { |
33 |
=head1 NAME |
|
|
34 |
|
35 |
Koha::Plugins - Module for loading and managing plugins. |
36 |
|
37 |
=cut |
38 |
|
39 |
sub new { |
40 |
my ( $class, $args ) = @_; |
41 |
|
34 |
my $pluginsdir = C4::Context->config("pluginsdir"); |
42 |
my $pluginsdir = C4::Context->config("pluginsdir"); |
35 |
my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir; |
43 |
my @pluginsdir = ref($pluginsdir) eq 'ARRAY' ? @$pluginsdir : $pluginsdir; |
36 |
foreach my $dir ( @pluginsdir ) { |
44 |
foreach my $dir ( @pluginsdir ) { |
Lines 39-57
BEGIN {
Link Here
|
39 |
->directory |
47 |
->directory |
40 |
->in($dir); |
48 |
->in($dir); |
41 |
|
49 |
|
42 |
push( @INC, @dirs ); |
50 |
foreach my $d ( @dirs ) { |
|
|
51 |
push( @INC, @dirs ) unless any { $_ eq $d } @INC; |
52 |
} |
43 |
} |
53 |
} |
44 |
pop @INC if $INC[-1] eq '.'; |
54 |
pop @INC if $INC[-1] eq '.'; |
45 |
} |
|
|
46 |
|
47 |
=head1 NAME |
48 |
|
49 |
Koha::Plugins - Module for loading and managing plugins. |
50 |
|
51 |
=cut |
52 |
|
53 |
sub new { |
54 |
my ( $class, $args ) = @_; |
55 |
|
55 |
|
56 |
return unless ( C4::Context->config("enable_plugins") || $args->{'enable_plugins'} ); |
56 |
return unless ( C4::Context->config("enable_plugins") || $args->{'enable_plugins'} ); |
57 |
|
57 |
|
58 |
- |
|
|