From 6a55fad7b42ce8a9735dabc965dfd524899e4e71 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 7 Jul 2023 10:03:36 +0200 Subject: [PATCH] Bug 33105: Redirect to 404 if no vendor exists Signed-off-by: Marcel de Rooy Signed-off-by: Tomas Cohen Arazi --- acqui/vendor_issues.pl | 5 +++++ .../intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/acqui/vendor_issues.pl b/acqui/vendor_issues.pl index 561769c28e..48a8ef703e 100755 --- a/acqui/vendor_issues.pl +++ b/acqui/vendor_issues.pl @@ -48,6 +48,11 @@ if ( $issue_id ) { } my $vendor = Koha::Acquisition::Booksellers->find($booksellerid); +unless ( $vendor ) { + print $input->redirect("/cgi-bin/koha/errors/404.pl"); + exit; +} + if ( $op eq 'add_form' || $op eq 'show' ) { $template->param( issue => $issue ); } elsif ( $op eq 'add_validate' ) { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt index 4a6a672875..0a9de738a7 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/vendor_issues.tt @@ -137,7 +137,8 @@ -
+ +
-- 2.39.5