Lines 29-34
use C4::Output qw( output_html_with_http_headers output_and_exit_if_error );
Link Here
|
29 |
use C4::Templates; |
29 |
use C4::Templates; |
30 |
use Koha::Acquisition::Currencies; |
30 |
use Koha::Acquisition::Currencies; |
31 |
use Koha::Database::Columns; |
31 |
use Koha::Database::Columns; |
|
|
32 |
use Koha::ILL::Backends; |
32 |
use IO::File; |
33 |
use IO::File; |
33 |
use YAML::XS; |
34 |
use YAML::XS; |
34 |
use Encode; |
35 |
use Encode; |
Lines 79-84
sub _get_chunk {
Link Here
|
79 |
$chunk->{'input_type'} = 'email'; |
80 |
$chunk->{'input_type'} = 'email'; |
80 |
} elsif ( $options{'class'} && $options{'class'} eq 'date' ) { |
81 |
} elsif ( $options{'class'} && $options{'class'} eq 'date' ) { |
81 |
$chunk->{'dateinput'} = 1; |
82 |
$chunk->{'dateinput'} = 1; |
|
|
83 |
} elsif ( $options{'type'} && $options{'type'} eq 'ill-backends' ) { |
84 |
my @priority_enabled_backends = split ",", C4::Context->preference('AutoILLBackendPriority'); |
85 |
my @sys_pref_backends = map( { name => $_, enabled => 1 }, @priority_enabled_backends ); |
86 |
|
87 |
my $installed_backends = Koha::ILL::Backends->installed_backends; |
88 |
foreach my $installed_backend ( @{$installed_backends} ) { |
89 |
if ( not grep { $installed_backend eq $_->{name} } @sys_pref_backends ) { |
90 |
my $backend = Koha::ILL::Request->new->load_backend($installed_backend); |
91 |
push( |
92 |
@sys_pref_backends, |
93 |
{ |
94 |
name => $installed_backend, |
95 |
enabled => 0, |
96 |
!$backend->_backend_capability('provides_backend_availability_check') |
97 |
? ( unable => 1 ) |
98 |
: () |
99 |
} |
100 |
); |
101 |
} |
102 |
} |
103 |
|
104 |
$chunk->{'ill_backends'} = \@sys_pref_backends; |
105 |
$chunk->{'type'} = 'ill_backends'; |
82 |
} elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { |
106 |
} elsif ( $options{'type'} && ( $options{'type'} eq 'opac-languages' || $options{'type'} eq 'staff-languages' ) ) { |
83 |
my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; |
107 |
my $current_languages = { map { +$_, 1 } split( /\s*,\s*/, $value ) }; |
84 |
|
108 |
|