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

(-)a/Koha/ILL/Request.pm (-3 / +6 lines)
Lines 403-422 sub status { Link Here
403
403
404
    my $backend_plugin = $self->get_backend_plugin($backend_name);
404
    my $backend_plugin = $self->get_backend_plugin($backend_name);
405
405
406
Returns the installed I<Koha::Plugin> corresponding to the given backend_id
406
Returns the installed I<Koha::Plugin> corresponding to the given backend_id or undef if no plugin is found
407
407
408
=cut
408
=cut
409
409
410
sub get_backend_plugin {
410
sub get_backend_plugin {
411
    my ( $self, $backend_id ) = @_;
411
    my ( $self, $backend_id ) = @_;
412
412
413
    my @backend_plugins = Koha::Plugins->new()->GetPlugins(
413
    my $koha_plugins    = Koha::Plugins->new();
414
    my @backend_plugins = $koha_plugins
415
        ? Koha::Plugins->new()->GetPlugins(
414
        {
416
        {
415
            method   => 'ill_backend',
417
            method   => 'ill_backend',
416
            metadata => { name => $backend_id },
418
            metadata => { name => $backend_id },
417
            all      => 1,
419
            all      => 1,
418
        }
420
        }
419
    );
421
        )
422
        : ();
420
423
421
    return $backend_plugins[0];
424
    return $backend_plugins[0];
422
}
425
}
(-)a/Koha/ILL/Request/Config.pm (-5 / +6 lines)
Lines 113-127 Returns a list of names for all the installed ILL backend plugins. Link Here
113
=cut
113
=cut
114
114
115
sub get_backend_plugin_names {
115
sub get_backend_plugin_names {
116
    my ( $self ) = @_;
116
    my ($self) = @_;
117
117
118
    return () unless C4::Context->config("enable_plugins");
118
    my $koha_plugins    = Koha::Plugins->new();
119
    my @backend_plugins = Koha::Plugins->new()->GetPlugins(
119
    my @backend_plugins = $koha_plugins
120
        ? $koha_plugins->GetPlugins(
120
        {
121
        {
121
            method => 'ill_backend',
122
            method => 'ill_backend',
122
            all    => 1
123
            all    => 1
123
        }
124
        }
124
    );
125
        )
126
        : ();
125
127
126
    return map { $_->{metadata}->{name} } @backend_plugins;
128
    return map { $_->{metadata}->{name} } @backend_plugins;
127
}
129
}
128
- 

Return to bug 37872