Bug 24471: Rename handle_commit_maybe method

To test (k-t-d):
1) Enable ILLModule and install FreeForm, run:
  bash <(curl -s https://raw.githubusercontent.com/ammopt/koha-ill-dev/master/start-ill-dev.sh)
2) Checkout 24.05.x branch, run:
  cd /kohadevbox/koha/Koha/Illbackends/FreeForm
  git checkout 24.05.x
3) Create a new ILL request from:
  http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl
4) Confirm the request creation works as before

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Pedro Amorim 2024-07-03 15:59:33 +00:00 committed by Katrin Fischer
parent d30f87b697
commit 32311b9ac0
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -157,7 +157,7 @@ if ( $backends_available ) {
whole => $backend_result, whole => $backend_result,
request => $request request => $request
); );
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} }
} elsif ( $op eq 'migrate' ) { } elsif ( $op eq 'migrate' ) {
# We're in the process of migrating a request # We're in the process of migrating a request
@ -187,7 +187,7 @@ if ( $backends_available ) {
request => $request request => $request
); );
} }
handle_commit_maybe( $backend_result, $request ); redirect_user( $backend_result, $request );
} elsif ( $op eq 'confirm' ) { } elsif ( $op eq 'confirm' ) {
# Backend 'confirm' method # Backend 'confirm' method
@ -200,7 +200,7 @@ if ( $backends_available ) {
); );
# handle special commit rules & update type # handle special commit rules & update type
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} elsif ( $op eq 'cud-cancel' ) { } elsif ( $op eq 'cud-cancel' ) {
# Backend 'cancel' method # Backend 'cancel' method
@ -213,7 +213,7 @@ if ( $backends_available ) {
); );
# handle special commit rules & update type # handle special commit rules & update type
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} elsif ( $op eq 'cud-edit_action' ) { } elsif ( $op eq 'cud-edit_action' ) {
$op =~ s/^cud-//; $op =~ s/^cud-//;
@ -279,7 +279,7 @@ if ( $backends_available ) {
next => 'illlist', next => 'illlist',
value => {} value => {}
}; };
handle_commit_maybe( $backend_result, $request ); redirect_user( $backend_result, $request );
} }
} }
@ -321,7 +321,7 @@ if ( $backends_available ) {
); );
# handle special commit rules & update type # handle special commit rules & update type
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} elsif ( $op eq 'cud-generic_confirm' ) { } elsif ( $op eq 'cud-generic_confirm' ) {
$op =~ s/^cud-//; $op =~ s/^cud-//;
@ -383,7 +383,7 @@ if ( $backends_available ) {
}; };
# handle special commit rules & update type # handle special commit rules & update type
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} elsif ( $op eq 'cud-check_out') { } elsif ( $op eq 'cud-check_out') {
$op =~ s/^cud-//; $op =~ s/^cud-//;
my $request = Koha::ILL::Requests->find($params->{illrequest_id}); my $request = Koha::ILL::Requests->find($params->{illrequest_id});
@ -471,7 +471,7 @@ if ( $backends_available ) {
); );
# handle special commit rules & update type # handle special commit rules & update type
handle_commit_maybe($backend_result, $request); redirect_user($backend_result, $request);
} }
} }
@ -484,7 +484,7 @@ $template->param(
output_html_with_http_headers( $cgi, $cookie, $template->output ); output_html_with_http_headers( $cgi, $cookie, $template->output );
sub handle_commit_maybe { sub redirect_user {
my ( $backend_result, $request ) = @_; my ( $backend_result, $request ) = @_;
# We need to special case 'commit' # We need to special case 'commit'