Lines 64-71
sub new {
Link Here
|
64 |
my $self = {}; |
64 |
my $self = {}; |
65 |
|
65 |
|
66 |
$self->{configuration} = _load_configuration( |
66 |
$self->{configuration} = _load_configuration( |
67 |
C4::Context->config("interlibrary_loans"), |
67 |
C4::Context->config("interlibrary_loans") |
68 |
C4::Context->preference("UnmediatedILL") |
|
|
69 |
); |
68 |
); |
70 |
|
69 |
|
71 |
bless $self, $class; |
70 |
bless $self, $class; |
Lines 230-236
file to ensure we have only valid input there.
Link Here
|
230 |
=cut |
229 |
=cut |
231 |
|
230 |
|
232 |
sub _load_configuration { |
231 |
sub _load_configuration { |
233 |
my ( $xml_config, $unmediated ) = @_; |
232 |
my ( $xml_config ) = @_; |
234 |
my $xml_backend_dir = $xml_config->{backend_directory}; |
233 |
my $xml_backend_dir = $xml_config->{backend_directory}; |
235 |
|
234 |
|
236 |
# Default data structure to be returned |
235 |
# Default data structure to be returned |
Lines 309-317
sub _load_configuration {
Link Here
|
309 |
# ILL Partners |
308 |
# ILL Partners |
310 |
$configuration->{partner_code} = $xml_config->{partner_code} || 'ILLLIBS'; |
309 |
$configuration->{partner_code} = $xml_config->{partner_code} || 'ILLLIBS'; |
311 |
|
310 |
|
312 |
die "No DEFAULT_FORMATS has been defined in koha-conf.xml, but UNMEDIATEDILL is active." |
|
|
313 |
if ( $unmediated && !$configuration->{default_formats}->{default} ); |
314 |
|
315 |
return $configuration; |
311 |
return $configuration; |
316 |
} |
312 |
} |
317 |
|
313 |
|