Lines 600-622
sub backend_create {
Link Here
|
600 |
my ( $self, $params ) = @_; |
600 |
my ( $self, $params ) = @_; |
601 |
|
601 |
|
602 |
# Establish whether we need to do a generic copyright clearance. |
602 |
# Establish whether we need to do a generic copyright clearance. |
603 |
if ( ( !$params->{stage} || $params->{stage} eq 'init' ) |
603 |
if ($params->{opac}) { |
604 |
&& C4::Context->preference("ILLModuleCopyrightClearance") ) { |
604 |
if ( ( !$params->{stage} || $params->{stage} eq 'init' ) |
605 |
return { |
605 |
&& C4::Context->preference("ILLModuleCopyrightClearance") ) { |
606 |
error => 0, |
606 |
return { |
607 |
status => '', |
607 |
error => 0, |
608 |
message => '', |
608 |
status => '', |
609 |
method => 'create', |
609 |
message => '', |
610 |
stage => 'copyrightclearance', |
610 |
method => 'create', |
611 |
value => { |
611 |
stage => 'copyrightclearance', |
612 |
backend => $self->_backend->name |
612 |
value => { |
613 |
} |
613 |
backend => $self->_backend->name |
614 |
}; |
614 |
} |
615 |
} elsif ( defined $params->{stage} |
615 |
}; |
616 |
&& $params->{stage} eq 'copyrightclearance' ) { |
616 |
} elsif ( defined $params->{stage} |
617 |
$params->{stage} = 'init'; |
617 |
&& $params->{stage} eq 'copyrightclearance' ) { |
|
|
618 |
$params->{stage} = 'init'; |
619 |
} |
618 |
} |
620 |
} |
619 |
|
|
|
620 |
# First perform API action, then... |
621 |
# First perform API action, then... |
621 |
my $args = { |
622 |
my $args = { |
622 |
request => $self, |
623 |
request => $self, |