View | Details | Raw Unified | Return to bug 18837
Collapse All | Expand All

(-)a/Koha/Illrequest.pm (-2 / +17 lines)
Lines 276-287 capabilities & custom_capability and their callers. Link Here
276
sub _backend_capability {
276
sub _backend_capability {
277
    my ( $self, $name, $args ) = @_;
277
    my ( $self, $name, $args ) = @_;
278
    my $capability = 0;
278
    my $capability = 0;
279
    # See if capability is defined in backend
279
    try {
280
    try {
280
        $capability = $self->_backend->capabilities($name);
281
        $capability = $self->_backend->capabilities($name);
281
    } catch {
282
    } catch {
282
        return 0;
283
        return 0;
283
    };
284
    };
284
    if ( $capability ) {
285
    # Try to invoke it
286
    if ( $capability && ref($capability) eq 'CODE' ) {
285
        return &{$capability}($args);
287
        return &{$capability}($args);
286
    } else {
288
    } else {
287
        return 0;
289
        return 0;
Lines 742-747 sub backend_create { Link Here
742
    # ...Updating status!
744
    # ...Updating status!
743
    $self->status('QUEUED')->store unless ( $permitted );
745
    $self->status('QUEUED')->store unless ( $permitted );
744
746
747
    ## Handle Unmediated ILLs
748
749
    # For the unmediated workflow we only need to delegate to our backend. If
750
    # that backend supports unmediateld_ill, it will do its thing and return a
751
    # proper response.  If it doesn't then _backend_capability returns 0, so
752
    # we keep the current result.
753
    if ( C4::Context->preference("ILLModuleUnmediated") && $permitted ) {
754
        my $unmediated_result = $self->_backend_capability(
755
            'unmediated_ill',
756
            $args
757
        );
758
        $result = $unmediated_result if $unmediated_result;
759
    }
760
745
    return $self->expandTemplate($result);
761
    return $self->expandTemplate($result);
746
}
762
}
747
763
748
- 

Return to bug 18837