From a98af95e32e079ffda27a4e566f990d2b2d6caa5 Mon Sep 17 00:00:00 2001 From: Emily Lamancusa Date: Fri, 10 May 2024 14:01:59 -0400 Subject: [PATCH] Bug 36832: (bug 36791 follow-up) Allow authid=0 To test: 1. Go to the Authorities module and do a Z39.50 search that will return results (e.g. a general subject heading) 2. Import an authority record from the results --> Confirm that the record is imported into the editor 3. Authorities > New, replace it via Z39.50, confirm it's imported 4. Authorities > New, fill the required fields, confirm it saves 5. Edit an existing authority, replace it via Z39.50, confirm it saves 6. Edit an existing authority, replace authid=nn in the URL with a number that doesn't exist like 1000000, confirm you get a 404 page Signed-off-by: Phil Ringnalda Signed-off-by: Janusz Kaczmarek Signed-off-by: Victor Grousset/tuxayo Signed-off-by: Katrin Fischer (cherry picked from commit 1aba01adb4ff61c6af77af6b42f13d29d55df4f2) Signed-off-by: Fridolin Somers (cherry picked from commit aa7bea04c43080e33843b0454140c674d5fef6a2) Signed-off-by: Lucas Gass --- authorities/authorities.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/authorities/authorities.pl b/authorities/authorities.pl index fb0a37dbd8..da4eec62ee 100755 --- a/authorities/authorities.pl +++ b/authorities/authorities.pl @@ -548,7 +548,7 @@ my $changed_authtype = $input->param('changed_authtype') // q{}; my $dbh = C4::Context->dbh; my $authobj = Koha::Authorities->find($authid); -if ( defined $authid && !$authobj ) { +if ( $authid && !$authobj ) { print $input->redirect("/cgi-bin/koha/errors/404.pl"); # escape early exit; } -- 2.39.5