|
Lines 197-208
capabilities & custom_capability and their callers.
Link Here
|
| 197 |
sub _backend_capability { |
197 |
sub _backend_capability { |
| 198 |
my ( $self, $name, $args ) = @_; |
198 |
my ( $self, $name, $args ) = @_; |
| 199 |
my $capability = 0; |
199 |
my $capability = 0; |
|
|
200 |
# See if capability is defined in backend |
| 200 |
try { |
201 |
try { |
| 201 |
$capability = $self->_backend->capabilities($name); |
202 |
$capability = $self->_backend->capabilities($name); |
| 202 |
} catch { |
203 |
} catch { |
| 203 |
return 0; |
204 |
return 0; |
| 204 |
}; |
205 |
}; |
| 205 |
if ( $capability ) { |
206 |
# Try to invoke it |
|
|
207 |
if ( $capability && ref($capability) eq 'CODE' ) { |
| 206 |
return &{$capability}($args); |
208 |
return &{$capability}($args); |
| 207 |
} else { |
209 |
} else { |
| 208 |
return 0; |
210 |
return 0; |
|
Lines 645-650
sub backend_create {
Link Here
|
| 645 |
# ...Updating status! |
647 |
# ...Updating status! |
| 646 |
$self->status('QUEUED')->store unless ( $permitted ); |
648 |
$self->status('QUEUED')->store unless ( $permitted ); |
| 647 |
|
649 |
|
|
|
650 |
## Handle Unmediated ILLs |
| 651 |
|
| 652 |
# For the unmediated workflow we only need to delegate to our backend. If |
| 653 |
# that backend supports unmediateld_ill, it will do its thing and return a |
| 654 |
# proper response. If it doesn't then _backend_capability returns 0, so |
| 655 |
# we keep the current result. |
| 656 |
if ( C4::Context->preference("ILLModuleUnmediated") && $permitted ) { |
| 657 |
my $unmediated_result = $self->_backend_capability( |
| 658 |
'unmediated_ill', |
| 659 |
$args |
| 660 |
); |
| 661 |
$result = $unmediated_result if $unmediated_result; |
| 662 |
} |
| 663 |
|
| 648 |
return $self->expandTemplate($result); |
664 |
return $self->expandTemplate($result); |
| 649 |
} |
665 |
} |
| 650 |
|
666 |
|
| 651 |
- |
|
|