View | Details | Raw Unified | Return to bug 25549
Collapse All | Expand All

(-)a/Koha/Plugins.pm (-2 / +1 lines)
Lines 164-177 sub InstallPlugins { Link Here
164
    my @plugin_classes = $self->plugins();
164
    my @plugin_classes = $self->plugins();
165
    my @plugins;
165
    my @plugins;
166
166
167
    # If we can reload the plugin we will add the methods back, if not they should be removed
168
    Koha::Plugins::Methods->search()->delete();
169
    foreach my $plugin_class (@plugin_classes) {
167
    foreach my $plugin_class (@plugin_classes) {
170
        if ( can_load( modules => { $plugin_class => undef }, nocache => 1 ) ) {
168
        if ( can_load( modules => { $plugin_class => undef }, nocache => 1 ) ) {
171
            next unless $plugin_class->isa('Koha::Plugins::Base');
169
            next unless $plugin_class->isa('Koha::Plugins::Base');
172
170
173
            my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} });
171
            my $plugin = $plugin_class->new({ enable_plugins => $self->{'enable_plugins'} });
174
172
173
            Koha::Plugins::Methods->search({ plugin_class => $plugin_class })->delete();
175
174
176
            foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) {
175
            foreach my $method ( @{ Class::Inspector->methods( $plugin_class, 'public' ) } ) {
177
                Koha::Plugins::Method->new(
176
                Koha::Plugins::Method->new(
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/plugins/plugins-home.tt (+15 lines)
Lines 116-121 Link Here
116
                            </tr>
116
                            </tr>
117
117
118
                            [% FOREACH plugin IN plugins %]
118
                            [% FOREACH plugin IN plugins %]
119
                                [% IF plugin.error %]
120
                                <tr class="warn">
121
                                    <td>
122
                                        <strong>[% plugin.name | html %]</strong>
123
                                        <span class="label label-warning">ERRORS</span>
124
                                    </td>
125
                                    [% IF ( CAN_user_plugins_configure || CAN_user_plugins_manage || CAN_user_plugins_report || CAN_user_plugins_tool ) %]
126
                                    <td colspan="7">Error found whilst attempting to load plugin</td>
127
                                    [% ELSE %]
128
                                    <td colspan="6">Error found whilst attempting to load plugin</td>
129
                                    [% END %]
130
                                </tr>
131
                                [% ELSE %]
119
                                <tr>
132
                                <tr>
120
                                    <td>
133
                                    <td>
121
                                        <strong>[% plugin.metadata.name | html %]</strong>
134
                                        <strong>[% plugin.metadata.name | html %]</strong>
Lines 181-186 Link Here
181
                                            </div>
194
                                            </div>
182
                                        </td>
195
                                        </td>
183
                                    [% END %]
196
                                    [% END %]
197
                                </tr>
198
                                [% END %]
184
                            [% END %]
199
                            [% END %]
185
                        </table>
200
                        </table>
186
                    [% END %]
201
                    [% END %]
(-)a/plugins/plugins-home.pl (-5 / +7 lines)
Lines 52-61 if ($plugins_enabled) { Link Here
52
        method       => $method,
52
        method       => $method,
53
    );
53
    );
54
54
55
    my @plugins = Koha::Plugins->new()->GetPlugins({
55
    my @plugins = Koha::Plugins->new()->GetPlugins(
56
        method => $method,
56
        {
57
        all    => 1,
57
            method => $method,
58
    });
58
            all    => 1,
59
            errors => 1
60
        }
61
    );
59
62
60
    $template->param( plugins => \@plugins, );
63
    $template->param( plugins => \@plugins, );
61
64
62
- 

Return to bug 25549