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: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Lucas Gass 2026-06-02 16:24:10 +00:00
parent 885577073c
commit eca5b83960
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
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" ) {