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

(-)a/Koha/Illrequest.pm (-2 / +17 lines)
Lines 352-363 capabilities & custom_capability and their callers. Link Here
352
sub _backend_capability {
352
sub _backend_capability {
353
    my ( $self, $name, $args ) = @_;
353
    my ( $self, $name, $args ) = @_;
354
    my $capability = 0;
354
    my $capability = 0;
355
    # See if capability is defined in backend
355
    try {
356
    try {
356
        $capability = $self->_backend->capabilities($name);
357
        $capability = $self->_backend->capabilities($name);
357
    } catch {
358
    } catch {
358
        return 0;
359
        return 0;
359
    };
360
    };
360
    if ( $capability ) {
361
    # Try to invoke it
362
    if ( $capability && ref($capability) eq 'CODE' ) {
361
        return &{$capability}($args);
363
        return &{$capability}($args);
362
    } else {
364
    } else {
363
        return 0;
365
        return 0;
Lines 819-824 sub backend_create { Link Here
819
    # ...Updating status!
821
    # ...Updating status!
820
    $self->status('QUEUED')->store unless ( $permitted );
822
    $self->status('QUEUED')->store unless ( $permitted );
821
823
824
    ## Handle Unmediated ILLs
825
826
    # For the unmediated workflow we only need to delegate to our backend. If
827
    # that backend supports unmediateld_ill, it will do its thing and return a
828
    # proper response.  If it doesn't then _backend_capability returns 0, so
829
    # we keep the current result.
830
    if ( C4::Context->preference("ILLModuleUnmediated") && $permitted ) {
831
        my $unmediated_result = $self->_backend_capability(
832
            'unmediated_ill',
833
            $args
834
        );
835
        $result = $unmediated_result if $unmediated_result;
836
    }
837
822
    return $self->expandTemplate($result);
838
    return $self->expandTemplate($result);
823
}
839
}
824
840
825
- 

Return to bug 18837