|
Lines 171-176
sub installed_backends {
Link Here
|
| 171 |
return [ grep { !/Standard/ } @{ $self->available_backends } ]; |
171 |
return [ grep { !/Standard/ } @{ $self->available_backends } ]; |
| 172 |
} |
172 |
} |
| 173 |
|
173 |
|
|
|
174 |
=head3 opac_available_backends |
| 175 |
|
| 176 |
Return a list of backends available in the OPAC |
| 177 |
|
| 178 |
=cut |
| 179 |
|
| 180 |
sub opac_available_backends { |
| 181 |
my ( $self, $loggedinuser ) = @_; |
| 182 |
my $reduced = C4::Context->preference('ILLOpacbackends'); |
| 183 |
my $backends = $self->available_backends($reduced); |
| 184 |
if ( !$loggedinuser && C4::Context->preference('ILLOpacUnauthenticatedRequest') ) { |
| 185 |
foreach my $backend ( @{$backends} ) { |
| 186 |
my $loaded_b = Koha::ILL::Request->new->load_backend($backend); |
| 187 |
@$backends = grep { !/$backend/ } @$backends |
| 188 |
if ( $loaded_b->_backend_capability('opac_unauthenticated_ill_requests') == 0 ); |
| 189 |
} |
| 190 |
} |
| 191 |
return $backends; |
| 192 |
} |
| 193 |
|
| 174 |
=head3 has_branch |
194 |
=head3 has_branch |
| 175 |
|
195 |
|
| 176 |
Return whether a 'branch' block is defined |
196 |
Return whether a 'branch' block is defined |