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

(-)a/Koha/Illrequest.pm (-1 / +2 lines)
Lines 681-687 Migrate a request from one backend to another. Link Here
681
681
682
sub backend_migrate {
682
sub backend_migrate {
683
    my ( $self, $params ) = @_;
683
    my ( $self, $params ) = @_;
684
684
    # Set the request's backend to be the destination backend
685
    $self->load_backend($params->{backend});
685
    my $response = $self->_backend_capability('migrate',{
686
    my $response = $self->_backend_capability('migrate',{
686
            request    => $self,
687
            request    => $self,
687
            other      => $params,
688
            other      => $params,
(-)a/Koha/Illrequest/Logger.pm (+4 lines)
Lines 185-190 sub get_log_template { Link Here
185
    } else {
185
    } else {
186
        # It's probably a backend log, so we need to get the path to the
186
        # It's probably a backend log, so we need to get the path to the
187
        # template from the backend
187
        # template from the backend
188
        #
189
        # We need to load the backend that this log was made from, so we
190
        # can get the template
191
        $params->{request}->load_backend($origin);
188
        my $backend =$params->{request}->{_my_backend};
192
        my $backend =$params->{request}->{_my_backend};
189
        return $backend->get_log_template_path($action);
193
        return $backend->get_log_template_path($action);
190
    }
194
    }
(-)a/ill/ill-requests.pl (-5 / +2 lines)
Lines 92-105 if ( $backends_available ) { Link Here
92
        my $request = Koha::Illrequests->find($params->{illrequest_id});
92
        my $request = Koha::Illrequests->find($params->{illrequest_id});
93
        my $backend_result;
93
        my $backend_result;
94
        if ( $params->{backend} ) {
94
        if ( $params->{backend} ) {
95
            my $new_request = Koha::Illrequest->new->load_backend( $params->{backend} );
95
            $backend_result = $request->backend_migrate($params);
96
            $backend_result = $new_request->backend_migrate($params);
97
            if ($backend_result) {
96
            if ($backend_result) {
98
                $template->param(
97
                $template->param(
99
                    whole   => $backend_result,
98
                    whole   => $backend_result,
100
                    request => $new_request
99
                    request => $request
101
                );
100
                );
102
                $request = $new_request;
103
            } else {
101
            } else {
104
                # Backend failure, redirect back to illview
102
                # Backend failure, redirect back to illview
105
                print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl'
103
                print $cgi->redirect( '/cgi-bin/koha/ill/ill-requests.pl'
106
- 

Return to bug 22614