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