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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 718-724 Migrate a request from one backend to another. Link Here
718
718
719
sub backend_migrate {
719
sub backend_migrate {
720
    my ( $self, $params ) = @_;
720
    my ( $self, $params ) = @_;
721
721
    # Set the request's backend to be the destination backend
722
    $self->load_backend($params->{backend});
722
    my $response = $self->_backend_capability('migrate',{
723
    my $response = $self->_backend_capability('migrate',{
723
            request    => $self,
724
            request    => $self,
724
            other      => $params,
725
            other      => $params,
(-)a/Koha/Illrequest/Logger.pm (+4 lines)
Lines 215-220 sub get_log_template { Link Here
215
    } else {
215
    } else {
216
        # It's probably a backend log, so we need to get the path to the
216
        # It's probably a backend log, so we need to get the path to the
217
        # template from the backend
217
        # template from the backend
218
        #
219
        # We need to load the backend that this log was made from, so we
220
        # can get the template
221
        $params->{request}->load_backend($origin);
218
        my $backend =$params->{request}->{_my_backend};
222
        my $backend =$params->{request}->{_my_backend};
219
        return $backend->get_log_template_path($action);
223
        return $backend->get_log_template_path($action);
220
    }
224
    }
(-)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