Lines 157-163
if ( $backends_available ) {
Link Here
|
157 |
whole => $backend_result, |
157 |
whole => $backend_result, |
158 |
request => $request |
158 |
request => $request |
159 |
); |
159 |
); |
160 |
handle_commit_maybe($backend_result, $request); |
160 |
redirect_user($backend_result, $request); |
161 |
} |
161 |
} |
162 |
} elsif ( $op eq 'migrate' ) { |
162 |
} elsif ( $op eq 'migrate' ) { |
163 |
# We're in the process of migrating a request |
163 |
# We're in the process of migrating a request |
Lines 187-193
if ( $backends_available ) {
Link Here
|
187 |
request => $request |
187 |
request => $request |
188 |
); |
188 |
); |
189 |
} |
189 |
} |
190 |
handle_commit_maybe( $backend_result, $request ); |
190 |
redirect_user( $backend_result, $request ); |
191 |
|
191 |
|
192 |
} elsif ( $op eq 'confirm' ) { |
192 |
} elsif ( $op eq 'confirm' ) { |
193 |
# Backend 'confirm' method |
193 |
# Backend 'confirm' method |
Lines 200-206
if ( $backends_available ) {
Link Here
|
200 |
); |
200 |
); |
201 |
|
201 |
|
202 |
# handle special commit rules & update type |
202 |
# handle special commit rules & update type |
203 |
handle_commit_maybe($backend_result, $request); |
203 |
redirect_user($backend_result, $request); |
204 |
|
204 |
|
205 |
} elsif ( $op eq 'cud-cancel' ) { |
205 |
} elsif ( $op eq 'cud-cancel' ) { |
206 |
# Backend 'cancel' method |
206 |
# Backend 'cancel' method |
Lines 213-219
if ( $backends_available ) {
Link Here
|
213 |
); |
213 |
); |
214 |
|
214 |
|
215 |
# handle special commit rules & update type |
215 |
# handle special commit rules & update type |
216 |
handle_commit_maybe($backend_result, $request); |
216 |
redirect_user($backend_result, $request); |
217 |
|
217 |
|
218 |
} elsif ( $op eq 'cud-edit_action' ) { |
218 |
} elsif ( $op eq 'cud-edit_action' ) { |
219 |
$op =~ s/^cud-//; |
219 |
$op =~ s/^cud-//; |
Lines 279-285
if ( $backends_available ) {
Link Here
|
279 |
next => 'illlist', |
279 |
next => 'illlist', |
280 |
value => {} |
280 |
value => {} |
281 |
}; |
281 |
}; |
282 |
handle_commit_maybe( $backend_result, $request ); |
282 |
redirect_user( $backend_result, $request ); |
283 |
} |
283 |
} |
284 |
} |
284 |
} |
285 |
|
285 |
|
Lines 321-327
if ( $backends_available ) {
Link Here
|
321 |
); |
321 |
); |
322 |
|
322 |
|
323 |
# handle special commit rules & update type |
323 |
# handle special commit rules & update type |
324 |
handle_commit_maybe($backend_result, $request); |
324 |
redirect_user($backend_result, $request); |
325 |
|
325 |
|
326 |
} elsif ( $op eq 'cud-generic_confirm' ) { |
326 |
} elsif ( $op eq 'cud-generic_confirm' ) { |
327 |
$op =~ s/^cud-//; |
327 |
$op =~ s/^cud-//; |
Lines 383-389
if ( $backends_available ) {
Link Here
|
383 |
}; |
383 |
}; |
384 |
|
384 |
|
385 |
# handle special commit rules & update type |
385 |
# handle special commit rules & update type |
386 |
handle_commit_maybe($backend_result, $request); |
386 |
redirect_user($backend_result, $request); |
387 |
} elsif ( $op eq 'cud-check_out') { |
387 |
} elsif ( $op eq 'cud-check_out') { |
388 |
$op =~ s/^cud-//; |
388 |
$op =~ s/^cud-//; |
389 |
my $request = Koha::ILL::Requests->find($params->{illrequest_id}); |
389 |
my $request = Koha::ILL::Requests->find($params->{illrequest_id}); |
Lines 471-477
if ( $backends_available ) {
Link Here
|
471 |
); |
471 |
); |
472 |
|
472 |
|
473 |
# handle special commit rules & update type |
473 |
# handle special commit rules & update type |
474 |
handle_commit_maybe($backend_result, $request); |
474 |
redirect_user($backend_result, $request); |
475 |
} |
475 |
} |
476 |
} |
476 |
} |
477 |
|
477 |
|
Lines 484-490
$template->param(
Link Here
|
484 |
|
484 |
|
485 |
output_html_with_http_headers( $cgi, $cookie, $template->output ); |
485 |
output_html_with_http_headers( $cgi, $cookie, $template->output ); |
486 |
|
486 |
|
487 |
sub handle_commit_maybe { |
487 |
sub redirect_user { |
488 |
my ( $backend_result, $request ) = @_; |
488 |
my ( $backend_result, $request ) = @_; |
489 |
|
489 |
|
490 |
# We need to special case 'commit' |
490 |
# We need to special case 'commit' |
491 |
- |
|
|