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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 721-727 Migrate a request from one backend to another. Link Here
721
721
722
sub backend_migrate {
722
sub backend_migrate {
723
    my ( $self, $params ) = @_;
723
    my ( $self, $params ) = @_;
724
724
    # Set the request's backend to be the destination backend
725
    $self->load_backend($params->{backend});
725
    my $response = $self->_backend_capability('migrate',{
726
    my $response = $self->_backend_capability('migrate',{
726
            request    => $self,
727
            request    => $self,
727
            other      => $params,
728
            other      => $params,
(-)a/Koha/Illrequest/Logger.pm (+4 lines)
Lines 216-221 sub get_log_template { Link Here
216
    } else {
216
    } else {
217
        # It's probably a backend log, so we need to get the path to the
217
        # It's probably a backend log, so we need to get the path to the
218
        # template from the backend
218
        # template from the backend
219
        #
220
        # We need to load the backend that this log was made from, so we
221
        # can get the template
222
        $params->{request}->load_backend($origin);
219
        my $backend =$params->{request}->{_my_backend};
223
        my $backend =$params->{request}->{_my_backend};
220
        return $backend->get_log_template_path($action);
224
        return $backend->get_log_template_path($action);
221
    }
225
    }
(-)a/ill/ill-requests.pl (-5 / +2 lines)
Lines 152-165 if ( $backends_available ) { Link Here
152
        my $request = Koha::Illrequests->find($params->{illrequest_id});
152
        my $request = Koha::Illrequests->find($params->{illrequest_id});
153
        my $backend_result;
153
        my $backend_result;
154
        if ( $params->{backend} ) {
154
        if ( $params->{backend} ) {
155
            my $new_request = Koha::Illrequest->new->load_backend( $params->{backend} );
155
            $backend_result = $request->backend_migrate($params);
156
            $backend_result = $new_request->backend_migrate($params);
157
            if ($backend_result) {
156
            if ($backend_result) {
158
                $template->param(
157
                $template->param(
159
                    whole   => $backend_result,
158
                    whole   => $backend_result,
160
                    request => $new_request
159
                    request => $request
161
                );
160
                );
162
                $request = $new_request;
163
            } else {
161
            } else {
164
                # Backend failure, redirect back to illview
162
                # Backend failure, redirect back to illview
165
                print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl'
163
                print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl'
166
- 

Return to bug 22614