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

(-)a/Koha/ILL/Request.pm (-3 / +6 lines)
Lines 401-420 sub status { Link Here
401
401
402
    my $backend_plugin = $self->get_backend_plugin($backend_name);
402
    my $backend_plugin = $self->get_backend_plugin($backend_name);
403
403
404
Returns the installed I<Koha::Plugin> corresponding to the given backend_id
404
Returns the installed I<Koha::Plugin> corresponding to the given backend_id or undef if no plugin is found
405
405
406
=cut
406
=cut
407
407
408
sub get_backend_plugin {
408
sub get_backend_plugin {
409
    my ( $self, $backend_id ) = @_;
409
    my ( $self, $backend_id ) = @_;
410
410
411
    my @backend_plugins = Koha::Plugins->new()->GetPlugins(
411
    my $koha_plugins    = Koha::Plugins->new();
412
    my @backend_plugins = $koha_plugins
413
        ? Koha::Plugins->new()->GetPlugins(
412
        {
414
        {
413
            method   => 'ill_backend',
415
            method   => 'ill_backend',
414
            metadata => { name => $backend_id },
416
            metadata => { name => $backend_id },
415
            all      => 1,
417
            all      => 1,
416
        }
418
        }
417
    );
419
        )
420
        : ();
418
421
419
    return $backend_plugins[0];
422
    return $backend_plugins[0];
420
}
423
}
(-)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