Lines 131-143
sub InstallPlugins {
Link Here
|
131 |
my @plugin_classes = $self->plugins(); |
131 |
my @plugin_classes = $self->plugins(); |
132 |
my @plugins; |
132 |
my @plugins; |
133 |
|
133 |
|
|
|
134 |
# If we can reload the plugin we will add the methods back, if not they should be removed |
135 |
Koha::Plugins::Methods->search()->delete(); |
134 |
foreach my $plugin_class (@plugin_classes) { |
136 |
foreach my $plugin_class (@plugin_classes) { |
135 |
if ( can_load( modules => { $plugin_class => undef }, nocache => 1 ) ) { |
137 |
if ( can_load( modules => { $plugin_class => undef }, nocache => 1 ) ) { |
136 |
next unless $plugin_class->isa('Koha::Plugins::Base'); |
138 |
next unless $plugin_class->isa('Koha::Plugins::Base'); |
137 |
|
139 |
|
138 |
my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} }); |
140 |
my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} }); |
139 |
|
141 |
|
140 |
Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete(); |
|
|
141 |
|
142 |
|
142 |
foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) { |
143 |
foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) { |
143 |
Koha::Plugins::Method->new( |
144 |
Koha::Plugins::Method->new( |