Lines 9-16
package C4::SIP::Sip::Configuration;
Link Here
|
9 |
use strict; |
9 |
use strict; |
10 |
use warnings; |
10 |
use warnings; |
11 |
use XML::Simple qw(:strict); |
11 |
use XML::Simple qw(:strict); |
|
|
12 |
use List::Util qw(uniq); |
12 |
|
13 |
|
13 |
use C4::SIP::Sip qw(siplog); |
14 |
use C4::SIP::Sip qw(siplog); |
|
|
15 |
use Koha::Libraries; |
14 |
|
16 |
|
15 |
my $parser = XML::Simple->new( |
17 |
my $parser = XML::Simple->new( |
16 |
KeyAttr => { |
18 |
KeyAttr => { |
Lines 47-52
sub new {
Link Here
|
47 |
} |
49 |
} |
48 |
$cfg->{listeners} = \%listeners; |
50 |
$cfg->{listeners} = \%listeners; |
49 |
|
51 |
|
|
|
52 |
my @branchcodes = Koha::Libraries->search()->get_column('branchcode'); |
53 |
my @institutions = uniq( keys %{ $cfg->{institutions} } ); |
54 |
foreach my $i ( @institutions ) { |
55 |
siplog("LOG_ERR", "ERROR: Institution $i does does not match a branchcode. This can cause unexpected behavior.") unless grep( /^$i$/, @branchcodes ); |
56 |
} |
57 |
|
50 |
return bless $cfg, $class; |
58 |
return bless $cfg, $class; |
51 |
} |
59 |
} |
52 |
|
60 |
|
53 |
- |
|
|