From eca5b83960e3f3d54e034bd727e337c7cdcd6ca7 Mon Sep 17 00:00:00 2001 From: Lucas Gass Date: Tue, 2 Jun 2026 16:24:10 +0000 Subject: [PATCH] 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 Signed-off-by: Martin Renvoize Signed-off-by: Lucas Gass --- suggestion/suggestion.pl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 500295251d..5e30118e0e 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -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" ) {