Bug 42750: Add redirect params back and exit after redirect

To test:
1. Find a patron
2. From the patron account click the "Purchase suggestions" button
3. Make a suggestion
4. Your are redirected to suggestion/suggestion.pl
5. APPLY PATCH, restart_all
6. Try again, this time you should be properly redirected back to the patron account: ( members/purchase-suggestions.pl?borrowernumber=X )

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
Lucas Gass 2026-06-02 16:24:10 +00:00 committed by Pedro Amorim
parent db044d8552
commit 391d9f461c
No known key found for this signature in database
GPG Key ID: 06B75BA7F3894D55
1 changed files with 2 additions and 0 deletions

View File

@ -273,6 +273,7 @@ if ( $op =~ /cud-save/ ) {
if ( $redirect eq 'purchase_suggestions' ) {
print $input->redirect("/cgi-bin/koha/members/purchase-suggestions.pl?borrowernumber=$borrowernumber");
exit;
}
}
} elsif ( $op eq 'add_form' ) {
@ -517,6 +518,7 @@ $template->param(
filter_archived => $filter_archived,
"op" => $op,
reasonsloop => $reasonsloop,
redirect => $redirect,
);
if ( defined($returnsuggested) and $returnsuggested ne "no_one" ) {